← All Python lessonsLesson 6 of 8 · ⭐ 20 XP

Loop the Loop

⭐ 0 XP · 🔥 0 day streak

Printing the numbers 1 to 100 by hand would take a hundred lines. Coders never repeat themselves — they use a loop, one block of code the computer runs again and again.

Your mission: the loop below stops after 2. Fix the range so it counts 1, 2, 3, 4, 5 — each on its own line — and the Done! line after the loop will print itself.

Checks

    Next lesson →