← 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="")
- A.12
- B.124
- C.1234
- 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 →