ACADEMIC YEAR (2024-2025) EVEN SEMESTER SUBJECT
CODE : 24ESC111 YEAR/SEMESTER : I/II
SUBJECT TITLE : Problem Solving And DEPARTMENT : ECE (SEC-I)
Python Programming
QUESTION BANK – UNIT 4
PART - A (2 MARKS)
S.No. Question Bloom's Level
1 Give examples for mutable and immutable objects. Understand
2 What is purpose of dictionary in Python? Remember
3 What is range() function and how it is used in lists? Understand
4 What are the advantages of Tuple over Lists? Understand
5 Write are list comprehension? Mention its advantages. Remember
6 What is a tuple in Python? Give an example. Remember
7 Define cloning in list. Remember
8 What is the benefit of using tuple assignment in python? Remember
9 In Python, how are the values stored in a list accessed? Should the Analysis
elements of a list be of the same data type?
10 How do Python’s dictionaries store data? Give an example. Understand
11 What is aliasing? Explain with example. Remember
12 List the functions of the tuple data type. Remember
13 Compare and contrast List and Tuple. Understand
14 Comment on tuples as a return type. Understand
15 When is a dictionary used instead of a list? Analysis
16 Differentiate between append() and extend() methods. Understand
17 What is the output of below program: Apply
list = ['abcd', 786, 2.23, 'john', 70.2]
tinylist = [123, 'john']
print(list + tiny_list
18 What is the difference between del() and remove() methods of a Understand
list?
19 Write the syntax for nested for loops and nested while loop Understand
statements.How to merge two dictionaries?
20 Give an example of List comprehension. Remember
21 How can you use List slicing to access list elements? Apply
22 Give an example for list looping. Understand
23 Explain any advanced list processing in Python with example. Understand
24 How do you access elements in a dictionary? Understand
25 Can you modify elements in tuple? Explain with reason. Analysis
PART - B ( 16 MARKS)
S.No. Question Bloom's Level
1 Define Python Lists. How to add elements to the list? Explain Understand
with a suitable example program.
2 a) Discuss the differences and applications of Lists, Tuple, Understand
Dictionary in Python. (8)
b) Explain List cloning with examples. (8)
3 a) Discuss Python dictionaries and list some of their Understand
methods. (8)
b) Write a simple sorting Python program to sort different
data types. (8)
4 Write a program to generate an electricity bill based upon the number Apply
of units consumed. Refer to the table below for unit and price details.
No. of units Price Price
consumed (Domestic) (Commercial)
Up to 200 units 200 (Base 500
price)
Units >200 and 1100 1700
<500
Units >500 <1000 4500 7000
Note: Program should read information from the user, whether it is for
domestic or commercial purposes.
5 Write code snippets in Python to perform the following: Apply
a) Accessing Elements of a Tuple (5)
b) Modifying Elements of a Tuple (5)
c) Deleting Elements of a Tuple (6)
6 a) Write separate Python programs to illustrate creating, Apply
accessing, concatenating, and deleting operations in a tuple.
(10)
b) Write a Python program to create a dictionary and sort the
content based on values in reverse order. (6)
7 What are the basic List operations that can be performed in Understand
Python? Explain each operation with its syntax and example.
8 Explain the following with example: Apply
a) List Slicing & List Mutability (6)
b) List Accessing Methods & List Comprehension (10)
9 What is Dictionary? Explain Python dictionaries in detail Understand
discussing its operations and methods.
10 Write Python Program for the following: Apply
a) Insertion sort (8)
b) Selection sort (8)
FACULTY IN-CHARGE HOD DEAN-CSE