Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
Programming in Python
Functions & scope
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.
- Scientific calculator allowed for all calculations.
- Official answer key is sealed at the end of this sheet.
End Term · 31 Aug 2025 (FN)End Term
- Q1MSQ3 Marks·Choose all correct options
Consider the following code snippet: def update_scores(scores, bonus): updated = [] for score in scores: updated.append(score + bonus) return updated original_scores = [10, 20, 30] new_scores = update_scores(original_scores, 5) Which of the following statements are TRUE?
- AThe list _(original_scores) remains unchanged after calling _(update_scores)
- BThe function _(update_scores) returns a new list
- CThe variable _(score) inside the function is local to the function
- DThe function modifies the _(scores) list in place
End Term · 13 Apr 2025 (FN)End Term
Read the passage below, then answer Q2–Q4
Q2MCQ1.5 Marks·Choose one option
- A

- B

- C

- D

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

- A

- B

- C

- D

- A
- Q4MSQ1 Mark·Choose all correct options

- A

- B

- C

- D

- A
End Term · 13 Apr 2025 (AN)End Term
- Q5MCQ3 Marks·Choose one option

- A8
- B4
- C12
- D3
End Term · 22 Dec 2024 (FN)End Term
- Q6MCQ3 Marks·Choose one option

- AThe return statement in line 3 which is inside the if-block
- BThe return statement in line 4 which is outside the if-block
- CBoth the return statements are executed
- DNeither of the return statements is executed
Read the passage below, then answer Q7–Q8
Q7MCQ2 Marks·Choose one option
- A

- B

- C

- D

- A
- Q8MCQ2 Marks·Choose one option

- A

- B

- C

- D

- A
End Term · 22 Dec 2024 (AN)End Term
- Q9MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
Read the passage below, then answer Q10–Q11
Q10MCQ1.5 Marks·Choose one option
- A

- B

- C

- D

- A
- Q11MCQ1.5 Marks·Choose one option

- A

- B

- C

- D

- A