Python_syllabus11.3.25_80fbfb7e0dc00759c15904358d3342f5
Python_syllabus11.3.25_80fbfb7e0dc00759c15904358d3342f5
3 L:T:P - 2:0:2
SEE: 100 Marks CIE: 50 marks
SEE Hours: 3 Total Marks: 100
Course Outcomes:
COs PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2
CO1 2 - - - 2 - - - - - - - To be identified
for each branch
by Course
Instructor
CO2 3 3 3 - 3 - - - - - - 2
CO3 3 3 3 - 3 - - - - - - -
CO4 2 - - - 2 1 - 1 - - - 2
Course Structure
1.3 Elements of Flow Control, Program Execution, Flow Control Statements, Importing
Modules 2 - -
Module – 2
2.1 Functions: def Statements with Parameters, Return Values and return Statements, The
None Value, Keyword Arguments and print(), Local and Global Scope, The global 2 - 1
Statement, Exception Handling.
2.2 Lists: The List Data Type, Working with Lists, Augmented Assignment Operators,
Methods, Example Program: Magic 8 Ball with a List, List-like Types: Strings and Tuples, 2
References
Module – 3
3.1 Dictionaries and Structuring Data: The Dictionary Data Type, Nested Dictionaries, Pretty 2
Printing.
3.2 Manipulating Strings: Working with Strings, Useful String Methods. 2 - 1
Module – 4
4.1 Reading and Writing Files: Files and File Paths, The os.path Module, The File Reading/
Writing Process. 2 - 1
Module – 5
5.1 Classes and objects: Programmer-defined types, Attributes, Rectangles, Instances as return 3 - -
values, Objects are mutable, Copying.
5.2 Classes and functions: Time, Pure functions, Modifiers. 1 - -
5.3 Classes and methods: Printing objects, The __init__method, The __str__ method, Operator
overloading. 2 - 1
List of Experiments:
1 a. Develop a program to read the student details like Name, USN, and Marks in three
subjects. Display the student details, total marks, and percentage with suitable messages.
b. Develop a program to read the name and year of birth of a person. Display whether the - - 1
person is a senior citizen or not.
2 a. Develop a program to generate Fibonacci sequence of length (N). Read N from the
console.
b. Write a function to calculate factorial of a number. Develop a program to compute - - 1
binomial coefficient (Given N and R).
3 Read N numbers from the console and create a list. Develop a program to print mean,
- - 1
variance, and standard deviation with suitable messages.
4 Read a multi-digit number (as chars) from the console. Develop a program to print the - - 1
frequency of each digit with suitable message.
5 Develop a program to print 10 most frequently appearing words in a text file. [Hint: Use
dictionary with distinct words and their frequency of occurrences. Sort the dictionary in - - 1
the reverse order of frequency and display dictionary slice of first 10 items]
6 Develop a program to sort the contents of a text file and write the sorted contents into a
separate text file. [Hint: Use string methods strip(), len(), list methods sort(), append(), - - 1
and file methods open(), readlines(), and write()].
7 Develop a program to backing Up a given Folder (Folder in a current working directory)
- - 1
into a ZIP File by using relevant modules and suitable methods.
8 Write a function named DivExp which takes TWO parameters a, b and returns a value c
(c=a/b),raise an exception when b=0. Develop a suitable program which reads two values
from the console and calls a function DivExp. - - 1
9 23
Define a function which takes TWO objects representing complex numbers and returns
new complex number with a addition of two complex numbers. Define a suitable class
- - 1
‘Complex’ to represent the complex number. Develop a program to read N (N >=2)
complex numbers and to compute the addition of N complex numbers.
10 Develop a program that uses class Student which prompts the user to enter marks in three
subjects and calculates total marks, percentage and displays the score card details. [Hint:
Use list to store the marks in three subjects and total marks. Use init () method to initialize - - 1
name, USN and the lists to store marks and total, Use getMarks() method to read
marks into the list, and display() method to display the score card details.]
Total No. of Lecture Hours 25 - -
Total No. of Tutorial Hours 00 -
Total No. of Practical Hours 15
Textbooks:
st
1. Al Sweigart, “Automate the Boring Stuff with Python”,1 Edition, No Starch Press, 2015. For lambda functions use
this link: https://www.learnbyexample.org/python-lambda-function/
nd
2. Allen B. Downey, “Think Python: How to Think Like a Computer Scientist”, 2 Edition, Green Tea Press, 2015.
Online Resources:
1. https://www.learnpython.org/
2. https://nptel.ac.in/courses/106106145