Python_Institute
PCEP-30-02 · Question #113
What is the expected output of the following code? ``python x = True y = False z = False if x or y and z: print('TRUE') else: print('FALSE') ``
The correct answer is B. TRUE. See the full explanation below for the reasoning.
Question
What is the expected output of the following code?
x = True
y = False
z = False
if x or y and z:
print('TRUE')
else:
print('FALSE')
Options
- AThe code is erroneous.
- BTRUE
- CFALSE
- DNone of the above.
How the community answered
(52 responses)- A13% (7)
- B75% (39)
- C8% (4)
- D4% (2)
Community Discussion
No community discussion yet for this question.