Quiz Space

Python End Term: 31 August 2025, Set QDF3 (May 2025 term)

Question 1

+3 marksOne correct option

Given the following code snippet, what will be the output?
if None:
print("None is True")
elif 0:
print("0 is True")
elif "":
print("Empty string is True")
else:
print("All False")

  1. A

    None is True

  2. B

    0 is True

  3. C

    Empty string is True

  4. D

    All False

Question 2

+3 marksOne correct option

Consider the below code snippet.
def updated_val(d, key, val):
if key in d:
d[key] += val
else:
d[key] = val
return d[key]
my_dict = {'a': 2, 'b': 3}
print(
updated_val(my_dict, 'c', 4)
+ updated_val(my_dict, 'c', 2)
+ updated_val(my_dict, 'a', 2)
)
What will be the output of the above code

  1. A

    6

  2. B

    14

  3. C

    10

  4. D

    Raises KeyError

Question 3

+3 marksOne correct option

Given the following code snippet, what will be the output?
a = (1, 2)
b = (3, 4)
c = ((5, 6),)
d = a + b + c
e = d[2:]
f = d[:2] + (e[2],)
print(f)

  1. A

    (3, 4, (5, 6))

  2. B

    (3, 4, 5, 6)

  3. C

    (1, 2, (5, 6))

  4. D

    (1, 2, 5, 6)

15 more questions in this paper

Sign in with Google — it is free — to see every question with its answer and explanation, practise it in learning mode, or take it as a timed mock test.

More on the Python End Term 31 Aug 2025 Set QDF3 paper

The IIT Madras BS Programming in Python (Python) End Term paper sat on 31 Aug 2025, in the May 2025 term, set QDF3: 18 questions for 50 marks in 180 minutes. The first 3 questions are below. Sign in with Google — it is free — to see the whole paper with its answers and explanations, in learning mode or as a timed mock test.

FeaturePython End Term 31 Aug 2025 Set QDF3 at a glance
TermMay 2025 term
SubjectProgramming in Python
Course codeBSCS1002
Questions18
Marks50
Duration180 min
MCQ9
MSQ3
Numerical6
Official paperIIT M FOUNDATION AN EXAM QDF3 31 Aug 2025
Negative markingNo negative marking.
Updated

Other sets that day

Same End Term, other subjects

More Python