← Quiz: Python Conditions: all 13 questions
Quiz: Python Conditions · Question 1 of 13
What does this print? (code)
What does this print?
x = 15
if x > 10:
print("A")
elif x > 5:
print("B")
else:
print("C")
- A.A
- B.B
- C.A and B
- D.C
Answer & explanation
Correct answer: A
The first true condition (x > 10) runs, and the rest are skipped. Only "A" is printed.
Can you get the rest right without peeking?
Take the timed Quiz: Python Conditions quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →