Python Programming
Python Programming
: 18ITO02
CHAITANYA BHARATHI INSTITUTE OF TECHNOLOGY (Autonomous)
B.E. (ECE) VII Sem (Main & Backlog) Examination December 2022
Python Programming
Time: 3 Hours Max Marks: 70
Note: Answer all questions from Part - A and Part – B at one place in the same order.
13 (a) Explain with suitable examples to perform reading and writing (5) 2 2
operations to files.
(b) Write a python program using functions for Generating Random (5) 2 3
Numbers.
(OR)
14 (a) Write a python program to convert uppercase to lowercase and vice (5) 2 3
versa using functions.
(b) Count number of alphabets, digits and special symbols in a text file (5) 2 3
using file handling functions.
15 (a) Write a program to search for a part of string with in a list. (5) 3 3
(b) Identify various operations over Lists using Python Script. (5) 3 4
(OR)
Page 1 of 2
Code No.: 18ITO02
16 (a) Discuss various methods used for List operations and give suitable (5) 3 3
example for at least 5 methods.
(b) Write a python program to find factorial of ‘n’ using recursion. (5) 3 3
17 (a) Write a python program to create user defined exception using (5) 4 3
keywords try, catch, except, else, finally, raise.
(b) Explain the functions findall() and finditer() for regular expressions. (5) 4 2
(OR)
18 (a) Write python program to demonstrate working with instances. (5) 4 3
(b) What is the difference between Object and Class? Write a python (5) 4 3
program to create customized exception on receiving negative value
while receiving student marks.
19 (a) Write a program to receive data from UI for driving license. (5) 5 3
(b) Draw Histogram for temperature of various cities in Python. Data to be (5) 5 3
imported from CSV file.
(OR)
20 (a) Write a program to receive data from UI for voter card. (5) 5 3
(b) Draw Bar Plot for % of votes poled in different boots. Data to be (5) 5 3
imported from CSV file.
******
Page 2 of 2