Q. Consider the following code:
z = x + 3
if z == 1:
y = 0
elif z == 2:
y = 10
elif z == 4:
y += 1
else:
y = 1
y = 0
elif z == 2:
y = 10
elif z == 4:
y += 1
else:
y = 1
What is the output if:
| S. No. | Input values | Output produced |
|---|---|---|
| (a) | x = 2 and y = 5? | |
| (b) | x = 3 and y = 5? |
Answer :-
| S. No. | Input values | Output produced |
|---|---|---|
| (a) | x = 2 and y = 5? | No output because there is no print statement. |
| (b) | x = 3 and y = 5? | No output because there is no print statement. |
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )