S.
Course Code Course Title Course Type Credit Week
N
4 24ONMCH604 Python Programming Prog. Core 4 12
PRE-REQUISITE --
a. Course Objectives
1. To develop Python programs with conditionals and loops.
2. To develop Python Graphical User Interface and to develop Python programs
that can read and write data from/to files.
3. To store and retrieve data from database using Python program.
b. Course Outcomes
CO1 Identify the core construct of python language and its data structure best suited for problem solving.
CO2 Understand the use of module, function, in-built string functions in problem solving.
CO3 Implement the GUI based application using the concept of classes and object
CO4 Create GUI based application using database for handling operations of the organization.
c. Syllabus:
Module-1 Introduction to Python and Basics
Introduction to python Introduction to python, features, setting up programming environment, python
program structure, Tokens: Keywords, identifier, variables, data types, operators.
Python Sequence Lists-Accessing elements, Index position, Using individual values from a list,
Changing/Adding and removing Elements, Organizing a list, Loop through an entire
list, Avoiding Indentation Error, Numerical Lists, Sublist, List comprehension, Tuple,
Set, Dictionary- Working with dictionaries, Looping through dictionaries, Nesting.
Experiment no. 1 1. Write a program to print twin primes less than 1000. If two consecutive odd
numbers are both prime, then they are known as twin primes.
2. Write a program to implement these formulae of permutations and combinations.
Number of permutations of n objects taken r at a time: p (n, r) = n! / (n-r)! Number
of combinations of n objects taken r at a time is: c (n, r) = n! / (r! *(n-r)!) = p(n,r) /
r!
Conditional Statements Concept of indentation If, If Else, Switch; Looping: For, While, Nested loops, Jumping
statements
Experiment no. 2 Two different numbers are called amicable numbers if the sum of the proper divisors
of each is equal to the other number. For example, 220 and 284 are amicable numbers.
Sum of proper divisors of 220 = 1+2+4+5+10+11+20+22+44+55+110 = 284 Sum of
proper divisors of 284 = 1+2+4+71+142 = 220 Write a function to print pairs of
amicable numbers in a range.
Function Passing arguments, Return Values, Passing a list, Passing an Arbitrary number of
arguments, Function in Modules, Recursive function, Nested functions, Default and
flexible arguments, Lambda function,Map() function, Filter function, Reduce()
function, Python inbuilt functions
Experiment no. 3 WAP to get user id, user name, and user age from user and based on the entered id
print the details foe particular user. Hint: us dictionary.
Class Creating and using a class, working with classes and Instances, public and private
members, Inheritance, types of inheritance, Polymorphism, Importing Classes, Python
Standard library.
Experiment no. 4 1. Implement a Student class with information such as rollno, name, class. The
information must be entered by the user.
Create a program to implement library management system using classes and objects
Module-2 Data Analytics
Introduction to Data Introduction to Data Analytics, requirements of data analytics in Python.
Analytics Introduction to Numpy, features, environment setup, numpy Ndarray, array creation
data types, array attributes, numpy operations, mathematical and statistical functions
Experiment no. 5 1. Write an experiment to swap two columns in numpy array
2. Write an experiment import a dataset with numbers and texts keeping the text intact
in python numpy?
Introduction to matplotlib Introduction to matplotlib, Figure class, Axes class, line plot, subplots, Bar plot,
histogram, scatter plot, pie chart, box plot, area chart, word cloud, Bee swarm plot,
violin graph, Working with text
Experiment no. 6 1. Write a python program to generate a simple bar graph using matplotlib. The
graph should be properly labeled.
2. Write a python program to generate Pie-chart using matplotlib. The graph should
be properly labeled.
3. Write a Python program to plot the function y = x2 using the matplotlib libraries.
Experiment no. 7 1. Write a program in Python to compute the greatest common divisor and the least
common multiple of two integers.
2. Write a program in Python to test if a number is equal to the sum of the cubes of
its digits. Find the smallest and largest such numbers in the range of 100 to1000
Experiment no. 8 1. Write a program in python to read sort a list of integer elements using the bubble
sort method. Display the sorted element on the screen.
2. Write a program in python to find out the frequency of each element in a list using
a dictionary.
SELF STUDY TOPIC numpy matrix, 3D graph
Module-3 Statistics
Statistics Central tendency, measure of dispersion, correlation and regression. Introduction to
pandas, data structure, implement statistics. Handling data frame, read csv, xls files.
Handling null values or missing data, group by. Data visualization with different
existing dataset. Random walks, PDF.
Experiment no. 9 Perform different statistics operations on dataset taken from kaggle or datagov
Data visualization using Introduction to seaborn, relational plots, categorical plots, distribution plots, matrix
seaborn and plotly [Link]:Line, bar, scatter, histogram, violin, gantt, heatmap, 3D graph.
Experiment no. 10 Visualize dataset using plotly and create heatmap of the correlation between different
columns
SELF STUDY TOPIC correlation matrix
d. Self-study topics for Advance learners: Dictionary comprehension, numpy matrix, 3D graph,
correlation matrix.
e. Textbooks / Reference Books
Textbooks
1. Allen B. Downey, “Think Python: How to Think Like a Computer Scientist”, 2nd edition,
Updated for Python 3, Shroff/O‘Reilly Publishers, 2016
([Link]
2. Michael Urban, Joel Murach, Mike Murach: Murach's Python Programming; Dec, 2016.
3. Guido van Rossum and Fred L. Drake Jr, An Introduction to Python – Revised and updated
for Python 3.2, Network Theory Ltd., 2011.
f. Assessment Pattern
Internal Assessment Weightage (%) External Assessment Weightage (%) Total Weightage(%)
30 70 100