← Quiz: Python Loops: all 13 questions
Quiz: Python Loops · Question 1 of 13
What does this print? (code)
What does this print?
for i in range(3):
print(i, end=" ")
- A.1 2 3
- B.0 1 2
- C.0 1 2 3
- D.3
Answer & explanation
Correct answer: 0 1 2
range(3) starts at 0 and stops before 3.
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 →