CBSE-CLASS-XII SERIES Computer-science
Programming In Python
12 previous year questions.
Volume: 12 Ques
Yield: Medium
High-Yield Trend
12
2025 Chapter Questions 12 MCQs
01
PYQ 2025
medium
computer-science ID: cbse-cla
Assertion (A): For a binary file opened using 'rb' mode,
the pickle.dump() method will display an error.
Reason (R): The pickle.dump() method is used to read from a binary file.
the pickle.dump() method will display an error.
Reason (R): The pickle.dump() method is used to read from a binary file.
1
Both Assertion (A) and Reason (R) are true and Reason (R) is the correct explanation for Assertion (A).
2
Both Assertion (A) and Reason (R) are true and Reason (R) is not the correct explanation for Assertion (A).
3
Assertion (A) is true but, Reason (R) is false.
4
Assertion (A) is false but, Reason (R) is true.
02
PYQ 2025
medium
computer-science ID: cbse-cla
Which of the following built-in function/method returns a dictionary?
1
dict()
2
keys()
3
values()
4
items()
03
PYQ 2025
medium
computer-science ID: cbse-cla
Consider the statements given below and then choose the correct output from the given options:
N = '5' try: print('WORD' + N, end='#') except: print('ERROR', end='#') finally: print('OVER') 1
ERROR#
2
WORD5#OVER
3
WORD5#
4
ERROR#OVER
04
PYQ 2025
medium
computer-science ID: cbse-cla
Consider the statements given below and then choose the correct output from the given options:
def Change(N): N = N + 10 print(N, end='$$') N = 15 Change(N) print(N)
1
25$$15
2
15$$25
3
25$$25
4
25 25$$
05
PYQ 2025
medium
computer-science ID: cbse-cla
Consider the statements given below and then choose the correct output from the given options:
D = {'S01': 95, 'S02': 96}
for I in D: print(I, end='#')
1
S01#S02#
2
95#96#
3
S01,95#S02,96#
4
S01#95#S02#96#
06
PYQ 2025
medium
computer-science ID: cbse-cla
Which of the following operator evaluates to True if the variable on either side of the operator points towards the same memory location and False otherwise?
1
is
2
is not
3
and
4
or
07
PYQ 2025
medium
computer-science ID: cbse-cla
Consider the statements given below and then choose the correct output from the given options:
L = ['TIC', 'TAC']
print(L[::-1])
L = ['TIC', 'TAC']
print(L[::-1])
1
['CIT', 'CAT']
2
['TIC', 'TAC']
3
['CAT', 'CIT']
4
['TAC', 'TIC']
08
PYQ 2025
medium
computer-science ID: cbse-cla
Identify the invalid Python statement out of the following options:
1
print("A", 10, end="*")
2
print("A", sep="*", 10)
3
print("A", 10, sep="*")
4
print("A"*10)
09
PYQ 2025
medium
computer-science ID: cbse-cla
Which of the following is the correct identifier?
1
global
2
Break
3
def
4
with
10
PYQ 2025
medium
computer-science ID: cbse-cla
Identify the correct output of the following code snippet:
game = "Olympic2024"
print(game.index("C"))
game = "Olympic2024"
print(game.index("C"))
1
0
2
6
3
-1
4
ValueError
11
PYQ 2025
medium
computer-science ID: cbse-cla
What will be the output of the following statement?
print(14%3**2*4)
print(14%3**2*4)
1
16
2
64
3
20
4
256
12
PYQ 2025
medium
computer-science ID: cbse-cla
State True or False: βA Python List must always contain all its elements of same data type.β