Question 7
What is the output?
The output contains
The output contains
p == 5
q == "Z"
p == "F"
q == "F"
The finally block executes only when an exception occurs
What is the output?
The output contains
The output contains
p == 5
q == "Z"
p == "F"
q == "F"
The finally block executes only when an exception occurs
Correct answers
The output contains
p == "F"
q == "F"
Question 7 of 20 in the IIT Madras BS Programming in Python (Python) End Term paper sat on 10 May 2026, in the January 2026 term (Programming In Python 06 May 26). It carries 3 marks.