SHRI VILE PARLE KELAVANI MANDAL’S
SHRI BHAGUBHAI MAFATLAL POLYTECHNIC
Programme: Computer Engineering Semester: IV
Course: Programming in Pyhton Course code: PRP198918
Question Bank for PT - 2
Sr. Questions CO Marks
No
1 Write a python script to display the calendar of the year 2023. CO3 3
2 Write a Python script to display random numbers from the CO3 3
range (1,200) with the step count as 2.
3 Explain map function with suitable example. CO3 3
4 Explain filter function with suitable example. CO3 3
5 Explain reduce function with suitable example. CO3 3
6 Explain Lambda function with suitable example. CO3 3
7 With suitable example. explain globals() and locals() in Python. CO3 4
8 Write a Python Script to define a class BookStore with CO4 6
constructor that initializes essential attributes. Also calculate
total valuation and develop member methods to update price
and quantity of a book. Use array of objects to read data of n
books.
9 Write a Python script to read data of n students (roll number, CO4 6
name,address and marks of 5 subject) display the data and also
percentage of each student. Use array of object to read and
display n students’ information.
10 Explain the built in attributes of a class. CO4 3 or 4
11 Show method overloading in Python with the help of an CO4 3 or 4
example.
12 Show overloading the binary operator with suitable CO4 3 or 4
example.(Any problem definition may be asked)
13 Define constructor in Python with an example. CO4 4/6
Describe super() method, Method Resolution Order(MRO)
14 Write the Python Script that replaces the white spaces with ‘$’ CO4 4
in the given below given string.
str = "I like programming in Python.
15 Explain with suitable example , how __str__ method of CO4 4
Exception class is overridden .
16 With suitable example explain customised Exception handling CO4 4
in Python.
SHRI VILE PARLE KELAVANI MANDAL’S
SHRI BHAGUBHAI MAFATLAL POLYTECHNIC
17 Explain Abstract class and Interface with suitable example. CO4 4
18 Write a regular expression in python script to display the name CO4 4
with the tag Mr.
19 Write a regular expression in python to display the date CO4 4
yyyymmdd separated by underscore(_) or slash (/) of the month
April (04) and May(05).
20 Write a python script to check the valid email id out of the CO4 6
given email addreses
21 Write the python script to create connection object and cursor CO5 6
object for connecting with Mysql database.
22 CO5 6
Write a Python Program to design the above shown form that
takes input from user and stores it in database.
23 CO5 6
Write a Python Program to design Login form and display if it is
authenticated user or not.
SHRI VILE PARLE KELAVANI MANDAL’S
SHRI BHAGUBHAI MAFATLAL POLYTECHNIC
24 CO4 6
Implement the inheritance shown in the above figs.
25 CO4 6
Implement the inheritance shown in the above figs.
26 Explain seek() and tell() methods in python CO4 3/4
27 Explain following file modes with example script: CO4 4
a) w b)r c)a
28 Define following terms: a) try b)except c)finally d)else CO4 3
29 Explain Exception handling with the help of example script CO4 6
*******************************ALL THE BEST*******************************