🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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")
  1. A.A
  2. B.B
  3. C.A and B
  4. 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 →