ABES Engineering College, Ghaziabad
B. Tech Odd Semester Sessional Test-2
Printed Pages:
Session: 2023-24
Semester: 3
Course Code: BCC302 Roll No.:
Course Name: Python Programming Time: 1.15 Hrs.
Maximum Marks: 30
Instructions:
1. Attempt All sections.
2. If require any missing data, then choose suitably.
Q. No. Question Marks CO KL PI
Section-A Total Marks: 20
1 Attempt ANY ONE part from the following Same K Levels Questions
Explain the Set in Python. Elaborate the various built-in functions
a) 2+3 CO3 K2 2.1.2
used in set.
Explain the concept of string. Write a program to print number
b) 2+3 CO3 K2 2.1.2
of alphabets and digits in a given string.
2 Attempt ANY ONE part from the following Same K Levels Questions
When to use python lists? Write python program to swap elements
a) 2+3 CO3 K2 1.3.1
in the list.
Differentiate between mutable and immutable objects in Python
b) 5 CO3 K2 1.3.1
language with example.
3 Attempt ANY ONE part from the following Same K Levels Questions
(i) Write a program that merges two dictionaries and handles
duplicate keys intelligently.
a) 5+5 CO3 K3 3.2.2
(ii) Write Python program to join two input tuples, if their first
element is common. [Company Specific]
Elaborate the importance of slicing in python. Provide the output
of below code snippet:
S = 'ABCDEFGHI'
print(S[2:7])
print(S[-7:-2])
b) print(S[2:-5]) 5+5 CO3 K3 3.2.2
A string is said to be a palindrome if the reverse of the string is the
same as the string. Consider the below examples:
1. Input: malayalam Output: Yes 2. Input: Python Output: No
Write a python program to check whether a string is palindrome or
not. [Company Specific]
Section-B Total Marks: 10
4 Attempt ANY ONE part from the following Same K Levels Questions
Write a program to check if given input number is Armstrong
a) 5 CO2 K3 2.1.3
number or not.
Implement a program that prints the following pattern.
b) 5 CO2 K3 2.1.3
5 Attempt ANY ONE part from the following Same K Levels Questions
Write short Note on:
i. Break
a) 2+2+1 CO2 K2 2.1.2
ii. Continue
iii. Pass
Discuss the basic structure of a for loop and while loop in python.
b) 2+3 CO2 K2 2.1.2
Why is there no "do while" loop in python?
CO Course Outcomes mapped with respective question
KL Bloom's knowledge Level (K1, K2, K3, K4, K5, K6)
K1-Remember, K2-Understand, K3-Apply, K4-Analyze, K5: Evaluate, K6-Create