Topic
These MCQs are for the Boolean logic section of lesson Making Choices.
First Multiple Choice Question
What will to following code segment print?
if (10 < 0) and (0 < -10):
print("A")
elif (10 > 0) or False:
print("B")
else:
print("C")
- A)
A - B)
B - C)
C - D)
BandC
Second Multiple Choice Question
What will to following code segment print?
if True or True:
if False and True or False:
print('A')
elif False and False or True and True:
print('B')
else:
print('C')
else:
print('D')
- A)
A - B)
B - C)
C - D)
D - E)
BandD
Distractors
- choice A: Incorrect order of operations.
- choice B: Correct,
- choice C: The student thought B was incorrect, perhaps due to a misunderstanding of how
orreturns as soon as one side is false. - choice D: Confusing
orwith “exclusive” or. - choice E: Doesn’t understand that the
elseis not evaluated if theifBoolean is True.