Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
Programming in Python
End Term · 13 Apr 2025 (Forenoon)
Official Paper
Examination Instructions & Guidelines
- Solve on notebook/paper first before checking solutions.
- MCQ: Exactly 1 option is correct. Negative marking applies.
- MSQ: One or more options correct. Select all to score.
- NAT: Numerical response. No negative marking.
- Scientific calculator allowed for all calculations.
- Official answer key is sealed at the end of this sheet.
- Q1MCQ3 Marks·Choose one option

- AIt reverses the entire sub-list from left to right, regardless of whether the elements are odd or even.
- BIt reverses only the odd elements in the range [left, right], leaving even elements in their original positions.
- CIt moves all even elements to the left and all odd elements to the right (a partition), but does not change the relative order of the odd elements themselves.
- DIt sorts the sub-list from left to right in ascending order, ignoring whether elements are odd or even.
- Q2MCQ3 Marks·Choose one option

- A2
- B3
- C5
- DIt will give an error
- Q3MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q4MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q5MCQ3 Marks·Choose one option

- AOnly X
- BOnly Y
- COnly Z
- DX and Z
- Q6MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q7NAT3 Marks·Write the number
Your answer: - Q8NAT3 Marks·Write the number
Your answer: - Q9NAT3 Marks·Write the number
Your answer: - Q10NAT3 Marks·Write the number
Your answer: - Q11NAT4 Marks·Write the number
Your answer: - Q12MSQ3 Marks·Choose all correct options

- A"debitcard", "badcredit"
- B"admirer", "married"
- C"schoolmaster", "theclassroom"
- D"aabbcc", "abcabc"
- Q13MSQ3 Marks·Choose all correct options

- A

- B

- C

- D

- A
- Q14MSQ3 Marks·Choose all correct options

- A

- B

- C

- D

- A
Read the passage below, then answer Q15–Q16

Based on the above data, answer the given subquestions.
Q15MCQ1.5 Marks·Choose one optionWhat will be the output of the given code?
- AEmployee Name: Alice Salary: 75000
- BEmployee Name: Alice Salary: 80000 Manager of Department: HR
- CEmployee Name: Alice Salary: 80000
- DManager of Department: HR
- Q16NAT1.5 Marks·Write the number
If the below main code is executed after the class definition, what will be the output?
Your answer: Read the passage below, then answer Q17–Q19
Q17MCQ1.5 Marks·Choose one option
- A

- B

- C

- D

- A
- Q18MSQ1.5 Marks·Choose all correct options

- A

- B

- C

- D

- A
- Q19MSQ1 Mark·Choose all correct options

- A

- B

- C

- D

- A