Model Qp Python
Model Qp Python
Note: 01. Answer any FIVE full questions, choosing at least ONE question from each MODULE.
Marks Bloom’s CO
Module -1 Taxonomy No
Level
Q.01 a Explain arithmetic expression? Explain the output of this statement : 6 CL2 C01
‘hello world’ + 100 + ’how are you’ and summarize the reason if the
statement produces an error.
b Describe various methods of importing modules in Python programs with 7 CL2 C01
proper examples. Explain which method is best.
c 7 CL3 C01
Demonstrate the concept of exception. Implement a code which prompts the
user for Celsius temperature, convert the temperature to Fahrenheit and print
out the converted temperature by handling the exception.
OR
Q.02 a Describe the flow control statement with proper example?. Discuss if and if 6 CL2 C01
else statements with flow chart.
7 CL2 C01
b Explain the local and global scope with local and global variables.
c Implement a python program to add n numbers accepted from the user and 7 CL3 C01
illustrate the logic implementation.
Module-2
Q. a Discuss list and dictionary data structure with example for each. 6 CL2 C02
03
b Implement a python program to accept n numbers and store them in a list. 7 CL2 C02
Then print the list without ODD numbers in it.
c For a=[‘hello’, ‘how’, [1,2,3], [[10,20,30]]] 7 CL3 C02
Summarize the output of following statement:
(i) print( a[ : : ] )
(ii) print(a[-3][0])
(iii) print(a[2][ : -1])
(iv) print(a[0][ : : -1])
OR
Q.04 a Explain different clipboard functions in python used in wiki markup 6 CL2 C02
b Implement a python program to read dictionary data and delete any given key 7 CL3 C02
entry in the dictionary. Explain the logical implementation of the program.
BIPPB105/205
7 CL3 C02
c Develop suitable Python programs with nested lists to explain copy.copy( )
and copy.deepcopy( ) methods.
Module-3
Q. 05 a Discuss different paths of file system. 6 CL2 C03
b Demonstrate with example of upper(), lower(), and isupper() string Methods 6 CL2 C03
c Illustrate the steps involved in: generating random quiz files. 8 CL3 C03
OR
a Explain the file reading process. Demonstrate with examples: 6 CL2 C03
1. opening a file using open()
06 2. reading the contents of file
b Discuss how lists would be written in the file and read from the file? 6 CL2 C03
c Illustrate the steps involved in multi clipboard functionality and also give the 8 CL3 C03
algorithm for the same.
Module-4
Q. 07 a Explain the role of Assertions in Python with a suitable program. 6 CL2 C03
b Explain permanent delete and safe delete with a suitable Python programming 8 CL2 C03
example to each.
c Develop a program to backing Up a given Folder (Folder in a current working 6 CL3 C03
directory) into a ZIP File by using relevant modules and suitable methods.
Q. 08 a Explain the functions with examples: (i) shutil.copytree() (ii) shutil.move() (iii) 6 CL2 C03
shutil.rmtree().
b Explain the support for Logging with logging module in Python. 8 CL2 C03
c Develop a Python program to traverse the current directory by listing sub 6 CL3 C03
folders and files.
Module-5
Q. 09 a Explain the methods __init__ and __str__ with suitable code example to each. 6 CL2 C04
b Write the following with syntax and suitable code snippet: i) Class definition ii) 6 CL3 C04
instantiation iii) passing an instance (or objects) as an argument.
c Write a function which takes TWO objects representing complex numbers and 8 CL3 C04
returns new complex number with a addition of two complex numbers. Define
a suitable class ‘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.
OR
Q. 10 a Explain the terms with example: (i) class (ii) objects (iii) instance variables 6 CL2 C04
b Write a program for operator overloading. 6 CL3 C04
c Develop a program that uses class Student which prompts the user to enter marks 8 CL3 C04
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 name, USN and the lists to store marks and
total, Use get Marks() method to read marks into the list, and display() method
to display the score card details.]
Course Outcomes
Cognitive
CO No. CO Description
level
CO 2 Analyze the methods to create and manipulate lists, tuples and dictionaries. CL3