Quiz Space

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

Question 1

+3 marksOne correct option

What will be the output of the following Python code?
words = ["jacket", "cap", "scarf", "hat", "sock"]
result = []
for idx, word in enumerate(words):
if idx % 2 == 0:
result.append(word[:2].upper() + str(idx))
elif len(word) > 4:
result.append(word[::-1][:3])
else:
result.append("0" + word[-1])
print(result)

  1. A

    ['JA0', 'pa0', 'SC2', 'tah', 'SO4']

  2. B

    ['JA0', '0p', 'SC2', 'tah', 'SO4']

  3. C

    ['JA0', '0p', 'SC2', '0t', 'SO4']

  4. D

    ['JA0', '0p', 'SC2', '0t', '0k']

Question 2

+3 marksOne correct option

Consider the following Python code:
def evaluate_score(score):
if score >= 90:
if score == 100:
print("Perfect Score")
else:
print("Excellent")
elif score >= 60:
if score >= 80:
print("Very Good")
else:
print("Good")
else:
if score >= 40:
if score % 2 == 0:
print("Needs Improvement")
else:
print("Barely Passed")
else:
print("Fail")
Which of the following inputs will produce the output Needs Improvement ?

  1. A

    42

  2. B

    47

  3. C

    39

  4. D

    60

Question 3

+3 marksOne correct option

Consider the following Python code:
class Employee:
def __init__(self, name):
self.name = name
self.role = "Employee"
def show_details(self):
print(f"{self.name} works as {self.role}")
class Developer(Employee):
def __init__(self, name):
super().__init__(name)
self.role = "Developer"
def show_details(self):
print(f"{self.name} writes code as a {self.role}")
super().show_details()
class Manager(Employee):
def __init__(self, name):
super().__init__(name)
self.role = "Manager"
def show_details(self):
print(f"{self.name} manages tasks as a {self.role}")
super().show_details()
employees = [
Developer("Ananya"),
Manager("Rajeev"),
Developer("Kiran")
]
for emp in employees:
emp.show_details()
What will be the output of the code above?

  1. A

    Ananya writes code as a Developer
    Ananya works as Developer
    Rajeev manages tasks as a Manager
    Rajeev works as Manager
    Kiran writes code as a Developer
    Kiran works as Developer

  2. B

    Ananya writes code as a Developer
    Ananya works as Employee
    Rajeev manages tasks as a Manager
    Rajeev works as Employee
    Kiran writes code as a Developer
    Kiran works as Employee

  3. C

    Ananya works as Developer
    Rajeev works as Manager
    Kiran works as Developer

  4. D

    Developer
    Employee
    Manager
    Employee
    Developer
    Employee

17 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 QDF1 paper

The IIT Madras BS Programming in Python (Python) End Term paper sat on 31 Aug 2025, in the May 2025 term, set QDF1: 20 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 QDF1 at a glance
TermMay 2025 term
SubjectProgramming in Python
Course codeBSCS1002
Questions20
Marks50
Duration180 min
MCQ8
MSQ5
Numerical7
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