🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Python Loops: all 13 questions

Quiz: Python Loops · Question 4 of 13

What does this print? (code)

What does this print?

for n in [1, 2, 3, 4]:
    if n == 3:
        continue
    print(n, end="")
  1. A.12
  2. B.124
  3. C.1234
  4. D.123
Answer & explanation

Correct answer: 124

continue skips printing 3, but the loop continues with 4.

Can you get the rest right without peeking?

Take the timed Quiz: Python Loops quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →