Question 9
Consider the below code.if x: print('x') else: if y: if z: print('z') print('y') else: print('none') Select the possible output(s) of the given code, assuming any possible values for x , y , and z .
x
z y
x y
none
x z
y
Consider the below code.if x: print('x') else: if y: if z: print('z') print('y') else: print('none') Select the possible output(s) of the given code, assuming any possible values for x , y , and z .
x
z y
x y
none
x z
y
Correct answers
x
z y
none
y
Question 9 of 18 in the IIT Madras BS Programming in Python (Python) Quiz 1 paper sat on 26 Oct 2025, in the September 2025 term (IIT M IMPROVEMENT AN EXAM QIA4 26 Oct). It carries 3 marks.