Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 39

Python Programming

Course Code: INT213


Course Overview
2 0 2
• L T P:

• Credit: 3
Course Objectives
• Explain the Python language syntax, including control statements, loops, and
functions to write programs for various mathematics, science, and game problems.
• Explain the core data structures like lists, dictionaries, tuples, and sets in Python to
store, process, and sort the data
• Apply the concepts of Object-oriented programming as used in Python using
encapsulation, polymorphism, and inheritance
• Apply Identify the external modules for creating and writing data to excel files and
inspect the file operations to navigate the file systems.
• Make use of tkinter programming for GUI applications by using database.
• Develop real-time applications using Python.
CO-PO MAPPING
CO PO PO PO PO PO PO PO PO PO PO PO PO PO
1 2 3 4 5 6 7 8 9 10 11 12 13
PO1:Engineering knowledge
CO1 Y Y Y PO2:Problem Analysis
PO3: Design and Development
CO2 Y Y Y PO4:Conduct Investigations
PO5:Modern Tool
CO3 Y Y Y PO6:The Engineer and society
PO7:Environment and sustainability
CO4 Y Y Y PO8:Ethics
PO9:Individual and Teamwork
CO5 Y Y Y Y PO10:Communication
PO11:Project management
CO6 Y Y Y Y Y Y Y Y Y Y PO12:Lifelong learning
PO13:Competitive skills

 Explain the Python language syntax, including control statements, loops, and functions to write programs for various mathematics,
science, and game problems.
 Explain the core data structures like lists, dictionaries, tuples, and sets in Python to store, process, and sort the data
 Apply the concepts of Object-oriented programming as used in Python using encapsulation, polymorphism, and inheritance
 Apply Identify the external modules for creating and writing data to excel files and inspect the file operations to navigate the file
systems.
 Make use of tkinter programming for GUI applications by using database.
 Develop real-time applications using Python.
Course Assessment Model
• Marks Breakup:
Activity Marks
Attendance 5
Continuous Assessment (CA)* 65
End-Term Practical (ETP) 30
100

CA
Programming Practice using HackerRank 40
Mini Project 15
Best 1 out of 2 MCQ Based Test 10
or
MOOC’s certificate
ETP
Hackathon/Programming Challenge 30
Course Assessment Model

• Programming Practice using HackerRank 40


Based on Number of questions attempted 360 Problems

0..50% 0 Marks (180 Problems)


51% 1 Marks (184 Problems)
75% 25 Marks (270 Problems)
90% or more 40 Marks (324 problems or more)
Note:
For each % of attempted questions after 50% of problems and student will be awarded with
marks as per above table.
Pedagogy to be used
WEEKLY SANDBOX ACTIVITY

Sandbox
The immersive,Intrinsic,In-class participation tool
Programming ..??
What is Python?

• Python is an open source, object-oriented, high-level powerful


programming language.
• Developed by Guido van Rossum in the early 1990s. Named after
Monty Python
• Python runs on many Unix variants, on the Mac, and on Windows
2000 and later.
YOUTUBE
YOUTUBE is one of the most popular websites in existence, it provides us with endless hours of video
entertainment. The Python programming language powers it and the features we love.
DROP BOX
DropBox started the online document storing revolution that has become part of
daily life. We now store almost everything in the cloud. Dropbox allows us to store,
sync, and share almost anything using the power of Python.
SURVEY MONKEY
Survey Monkey is the largest online survey company. They can handle over one
million responses every day on their rewritten Python.
GOOGLE
Python also provides the power behind the most popular search engine in the
world – Google.
QUORA
Quora is the number one place online to ask a question and receive answers from a
community of individuals. On their Python website relevant results are answered,
edited, and organized by these community members.
BITLY
A majority of the code for Bitly URL shortening services and analytics are all built
with Python.
REDDIT
Reddit is known as the front page of the internet. It is the place online to find information or
entertainment based on thousands of different categories. Posts and links are user generated and
are promoted to the top through votes. Many of Reddit’s capabilities rely on Python for their
functionality.
YAHOO MAPS
HIPMUNK
Hipmunk is making travel planning simple and delightful.
It also helps users find best deals on hotels.
Your Future ….!!!
Let’s Find Out ….!!

Write a Program using any language you


know to print “ HELLO WORLD “.
Python Is Easy to Use

• C++ Program :
#include <iostream><br>
int main()
{
cout << "Hello World" << endl;
return 0;
}
C Program

#include <stdio.h>
int main(int argc, char ** argv)
{
printf(“Hello, World!\n”);
}
Python Program :

• print ( "Hello World")


COMPARISON WITH C++

• Python code is often 5-10 times shorter than equivalent C++ code.

• Python uses algorithmic approach unlike C++.

• Python is an interpretable language whereas C++ is a compiled


language.
DOWNLOADING PYTHON
VERSION (3.2.1)
Unit 1
• Introduction: python programming language, introduction to program and debugging, formal and
natural language
• Variables, Expression and Statements : Values and types, variables, variables name and keywords,
statements, operators and operand, order of operations, operations on string, composition and
comments
• Conditionals and Iteration: modulus operator, boolean expressions, logic operators, conditional,
alternative execution, nested conditionals and return statements, while statements, encapsulation
and generalization
• Functions and recursion: function calls, type conversion and coercion, math functions, adding new
function, parameters and argument, recursion and its use
Unit 2
• String: string a compound data type, length, string traversal, string slices, comparision, find function,
looping and counting

• Lists: list values, length, membership, operations, slices, deletion, accessing elements, list and for
loops, list parameters and nested list

• Tuples and Dictionaries: mutability and tuples, tuple assignment, tuple as return values, random
numbers and list of random numbers, counting and many buckets, dictionaries operations and
methods, sparse matrices, aliasing and coping
Unit 3
• Classes and objects: creating classes, creating instance objects, accessing attributes, overview of
OOP terminology

• Object oriented programming terminology: Class Inheritance, Overriding Methods, Data Hiding,
Function Overloading.
Unit 4
• Files and Exceptions: text files, writing variables, directories, pickling, exceptions

• Regular Expressions – Concept of regular expression, various types of regular expressions, using
match function, Web Scraping by using Regular Expressions

• Building GUI using python: tkinter programming, tkinter widgets like button, canvas, entry, frame,
label, list box, menu, message, scale, text, spinbox, labelframe, tkMessagebox, standard attributes,
geometry managemen
Unit 5
• Using Databases with Python: Installation of MySQL Database Software, Verifying MySQL in the
windows Operating system, Installing MySQLdb Module, Verifying the MySQLdb Interface
Installation, Working with MySQl Databse, Using MySQL from python, Retrieving All Rows from a
Table, Inserting Rows into a Table, Deleting Rows into a Table, Updating Rows in a Table, Creating
Database Tables through python. Creating a GUI that handles an event

Unit 6
• Data visualization with matplotlib: line plot, multiple subplots in one figure, histograms, bar charts,
pie charts, scatter plots
• Handling data with pandas: series, dataframes, read and write csv file, operations using dataframe
• Numpy arrays: numpy - datatype, array operations, statistical functions, broadcasting
BOOK REFERENCES

Text Book:
Introduction to Programming using Python by Y. DANIEL LIANG, PEARSON
References Book:
Python Programming: Using Problem solving approach by REEMA THAREJA, OXFORD
UNIVERSITY PRESS
Different Python IDEs and Code Editors
IDE Size in MB Developed in
PyCharm BIG JAVA, PYTHON

Spyder BIG PYTHON

PyDev MEDIUM JAVA, PYTHON

Idle MEDIUM PYTHON

Wing BIG C, C++, PYTHON

Python Version : 3
Colaboratory, or "Colab" for short, allows you to write and execute Python in your
browser, with
– Zero configuration required
– Free access to GPUs
– Easy sharing
MOOC
MOOCs can bring knowledge to students and a useful form of online learning and can complement traditional university learning

• https://onlinecourses.nptel.ac.in/noc21_cs32/preview

Exemptions:-
If student will provide the certificate,4 weeks prior to ETE then MCQ
based category of CA will be exempted.

You might also like