Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
Programming in Python
End Term · 13 Apr 2025 (Afternoon)
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 converts all vowels to uppercase and consonants to lowercase while leaving digits unchanged.
- BIt reverses the order of characters in the string while converting all letters to lowercase.
- CIt removes all non-alphabetic characters and alternates uppercase and lowercase letters in the remaining string.
- DIt alternates the case of alphabetical characters based on their position, starting with uppercase at index 0, leaving non-alphabetic characters unchanged.
- Q2MCQ3 Marks·Choose one option

- A2
- B3
- C4
- D6
- Q3MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q4MCQ3 Marks·Choose one option

- A8
- B4
- C12
- D3
- Q5MCQ3 Marks·Choose one option

- AOnly A
- BOnly B
- COnly C
- DA and C
- Q6MCQ3 Marks·Choose one option

- AOnly Snippet-1 is correct
- BOnly Snippet-2 is correct
- CBoth Snippet-1 and Snippet-2 are correct
- DBoth Snippet-1 and Snippet-2 are incorrect
- 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"taco cat"
- B"civic room"
- C"racecar"
- D"level up"
- 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 below data answer the given subquestions.
Q15MSQ1.5 Marks·Choose all correct optionsWhich of the following statements about method overriding in PrimeProduct is true?
- A

- B

- C

- D

- A
- Q16MCQ1.5 Marks·Choose one option

- A1
- B2
- C3
- DCannot be determined
Read the passage below, then answer Q17–Q19
Based on the below code answer the given subquestions.
Q17NAT1 Mark·Write the number
Your answer:- Q18NAT1.5 Marks·Write the number
Your answer: - Q19NAT1.5 Marks·Write the number
What will be the value passed to the function in the call before the base case, if the function is called with the input 32456 ?
Your answer: