Dayananda Sagar Academy of Technology & Management
(Autonomous Institute under VTU)
Semester : 3
Course Title : Python Programming Lab
Course Code : BCS307
Course Type
(Theory/ Practical/ : Practical
Integrated)
Category : AEC
Stream : CSE CIE : 50 Marks
Teaching hours/ week : SEE
0:0:2:0 : 50 Marks
(L:T:P:S)
Total Hours : 24 SEE
: 2 hrs
Credits : 1 Duration
Course Outcomes: At the end of the course, the student will be able to:
RBT
CO Course Outcomes RBT Level
Level Indicator
Apply the fundamentals of basic programming concepts to solve basic
CO1 L4 An
problems
Inspect the Object-Oriented Programming concepts such as
CO2 L5 E
encapsulation, inheritance and polymorphism as used in Python.
Create programs using advanced Python concepts like file handling
CO3 L6 C
and containers.
Mapping of Course Outcomes to Program Outcomes:
CO/PO PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2 PSO3
CO1 3 3
CO2 2 3
CO3 3 3
92
Weblinks and Video Lectures (e-Resources)
1 https://www.geeksforgeeks.org/python-programming-language-tutorial/
2 https://www.w3schools.com/python/python_intro.asp
3 https://www.python.org/about/gettingstarted/
4 https://www.programiz.com/python-programming/examples
5 https://www.geeksforgeeks.org/itertools-in-python3/
CIE- Continuous Internal Evaluation (50 Marks)
Allotted TOTAL
Python LAB Evaluation
Marks CIE (50M)
Record 10
Continuous Average Score of
Evaluation - Observation 10 all experiments - 30 30
30 Marks Marks
Open Ended 10
Procedure and write-up 20
Lab IA- Reduced
Conduction and Results 60 LAB IA-100 Marks
20 Marks to 20
Viva Voce 20
SEE- Semester End Examination (50 Marks)
Bloom’s Category SEE Marks
Remember 4
Understand 3
Apply 18
Analyse 4
Evaluate 3
Create 18
List of Programs:
Warmup Programs:
Develop a simple python Program to
o Print the sentence “Welcome to CSE, DSATM!!!”
93
o Read input number from user and check if the number is positive, negative or 0
o First N Natural numbers using for and while loop
Sl. Experiments/Programs COs
No.
1 Functions: CO1
Create using Python
a. A Simple calculator.
b. A program to define a function with multiple return values
2 Strings: CO1
Build python program to
a. Find the length of the string without using any library functions.
b. Check if two strings are anagrams or not.
3 Lists and Tuples: CO1
Develop a python program to
a. Perform the given operations on a list:
i. Add ii. Insert iii. Slicing
b. Get a list of the even numbers from a given list of numbers.
c. Create tuples (name, age, address, college) for at least two members and
concatenate the tuples and print the concatenated tuples
4 Dictionaries: CO2
Develop a python program to
a. Check if a given key exists in a dictionary or not & to sum all the items in a
given dictionary
b. Convert Roman Numbers in to integer values using dictionaries
5 Files: CO1
Build python program to
a. Sort words in a file and put them in another file. The output file should have
only lower-case words, so any upper case words from source must be
lowered.
b. Find the most frequent words in a text. (read from a text file).
6 Pattern Recognition & Regular Expressions CO2
a. Write a function called isphonenumber () to recognize a pattern 415-555-
4242 without using regular expression and also write the code to recognize
the same pattern using regular expression.
b. Develop a python program that could search the text in a file for phone
numbers (+919900889977) and email addresses (
[email protected])
7 Classes CO2
a. Write a Python class named Circle constructed by a radius and two
methods which will compute the area and the perimeter of a circle.
b. 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.
[Use list to store the marks in three subjects and total marks. Use init() method to
initialize 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.]
8 Polymorphism and Inheritance CO2
a. By using the concept of inheritance write a python program to find the area
of triangle,
circle and rectangle
b. Write a python program to find the whether the given input is palindrome or
94
not (for both string and integer) using the concept of polymorphism and
inheritance.
9 lambda and filter functions CO2
a. Develop a python program to differentiate between Lambda functions and
def defined function
b. Develop a python program to find maximum of two numbers using lambda
function
c. Create a list of numbers. Separate the odd numbers of the list using filter()
and lambda function
10 map and itertools CO3
a. Write a python program to Multiply all elements of a list by 2 using lambda
and map() function
b. Write a Python program to generate combinations of a given length of a
given iterable
Open ended Programs
1 Develop a python program to print half pyramid, inverted half pyramid of numbers CO1
and Pascal's Triangle
2 Develop a Python program to check whether a given number is palindrome or not CO2
and also count the number of occurrences of each digit in the input number
3 Develop a program to backing Up a given Folder (Folder in a current working CO3
directory) into a ZIP File by using relevant modules and suitable methods.
4 Develop a python program to demonstrate Exception Handling CO3
5 Develop a python program to transform all elements of a list to upper case using CO3
lambda and map() function
95
CIE for Python Programming Lab (Ability Enhancement Course (Practical)):
CIE marks for the practical course are 50 Marks.
The split-up of CIE marks for record/ journal and test are in the ratio 60:40.
Each experiment is to be evaluated for conduction with an observation sheet and record
write-up. Rubrics for the evaluation of the journal/write-up for hardware/software
experiments are designed by the faculty who is handling the laboratory session and are
made known to students at the beginning of the practical session.
Record should contain all the specified experiments in the syllabus and each experiment
write-up will be evaluated for 10 marks.
Total marks scored by the students are scaled down to 30 marks (60% of maximum marks)
Weightage to be given for neatness and submission of record/write-up on time.
Department shall conduct a test of 100 marks after the completion of all the experiments
listed in the syllabus.
In a test, test write-up, conduction of experiment, acceptable result, and procedural
knowledge will carry a weightage of 60% and the rest 40% for viva-voce.
The suitable rubrics can be designed to evaluate each student’s performance and learning
ability.
The marks scored shall be scaled down to 20 marks (40% of the maximum marks).
The Sum of scaled-down marks scored in the report write-up/journal and marks of a test
is the total CIE marks scored by the student.
SEE for Python Programming Lab (Ability Enhancement Course(Practical))
SEE marks for the practical course are 50 Marks
SEE shall be conducted jointly by the two examiners of the same institute, examiners are
appointed by the Head of the Institute.
All laboratory experiments are to be included for practical examination.
(Rubrics) Breakup of marks and the instructions printed on the cover page of the answer
script to be strictly adhered to by the examiners. OR based on the course requirement
evaluation rubrics shall be decided jointly by examiners.
Students can pick one question (experiment) from the questions lot prepared by the examiners
Jointly.
Evaluation of test write-up/ conduction procedure and result/viva will be conducted
jointly by examiners.
General rubrics suggested for SEE are mentioned here, writeup-20%, Conduction procedure and
result in -60%, Viva-voce 20% of maximum marks. SEE for practical shall be evaluated for
100 marks and scored marks shall be scaled down to 50 marks (however, based on course type,
rubrics shall be decided by the examiners)
● Change of experiment is allowed only once and 15% of Marks allotted to the procedure part are
to be made zero.
The minimum duration of SEE is 02 hours
Note: L- Theory Lecture, T- Tutorial, P-Practical, S-Project, IPCC: Integrated Professional Core
Course,
CIE: Continuous Internal Evaluation, SEE: Semester End Examination.
96
1 Credit Course – Practical
Assessment Details (both CIE and SEE)
The weightage of Continuous Internal Evaluation (CIE) is 50% and for Semester End Exam
(SEE) is 50%. The minimum passing mark for the CIE is 40% of the maximum Marks (20 Marks
out of 50).
The minimum passing mark for the SEE is 40% of the maximum Marks (20 Marks out of 50).
A student shall be deemed to have satisfied the academic requirements and earned the credits
allotted to each subject/ course if the student secures not less than 35% (20 Marks out of 50) in
the Semester-End Examination (SEE), and a minimum of 40% (40 Marks out of 100) in the total
of the CIE (Continuous Internal Evaluation) and SEE (Semester End Examination) taken
together.
Continuous Internal Evaluation (CIE):
CIE marks for the practical course are 50 Marks. The split-up of CIE marks for record/ journal
and test are in the ratio 60:40.
Each experiment is to be evaluated for conduction with an observation sheet and record
write-up. Rubrics for the evaluation of the journal/write-up for hardware/software
experiments are designed by the faculty who is handling the laboratory session and are
made known to students at the beginning of the practical session.
Record should contain all the specified experiments in the syllabus and each experiment
write-up will be evaluated for 10 marks.
Total marks scored by the students are scaled down to 30 marks (60% of maximum marks).
Weightage to be given for neatness and submission of record/write-up on time.
Department shall conduct a test of 100 marks after the completion of all the experiments
listed in the syllabus.
In a test, test write-up, conduction of experiment, acceptable result, and procedural
knowledge will carry a weightage of 60% and the rest 40% for viva-voce.
The suitable rubrics can be designed to evaluate each student’s performance and learning
ability.
The marks scored shall be scaled down to 20 marks (40% of the maximum marks). The
Sum of scaled-down marks scored in the report write-up/journal and marks of a test is the
total CIE marks scored by the student.
97
Semester End Evaluation (SEE):
SEE marks for the practical course are 50 Marks.
SEE shall be conducted jointly by the two examiners of the same institute; examiners are
appointed by the Head of the Institute.
The examination schedule and names of examiners are informed to the university before the
conduction of the examination. These practical examinations are to be conducted between
the schedule mentioned in the academic calendar of the University. All laboratory
experiments are to be included for practical examination.
(Rubrics) Breakup of marks and the instructions printed on the cover page of the answer
script to be strictly adhered by the examiners or based on the course requirement evaluation
rubrics shall be decided jointly by examiners.
Students can pick one question (experiment) from the questions lot prepared by the
examiners jointly.
Evaluation of test write-up/ conduction procedure and result/viva will be conducted jointly by
examiners.
General rubrics suggested for SEE are mentioned here,
Writeup-20%,
Conduction procedure and result in -60%,
Viva-voce 20% of maximum marks.
SEE for practical shall be evaluated for 100 marks and scored marks shall be scaled down to
50 marks (however, based on course type, rubrics shall be decided by the examiners)
Change of experiment is allowed only once and 15% of Marks allotted to the procedure part
are to be made zero.
The minimum duration of SEE is 02 hours.
98