Question 7
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 7 of 14 in the IIT Madras BS Python Programming (Python (ES)) Quiz 1 paper sat on 26 Oct 2025, in the September 2025 term (IIT M ES DIPLOMA AN EXAM QED4 26 Oct). It carries 3 marks.