CurriculumPython for Loops and range() for KidsDoing something many times
Python for Loops and range() Explained for Kids
for and range() — one instruction, run again and again.
Doing something many times
You've written the same print() three times before to make three lines. There's a much better way.
for i in range(3): repeats the indented lines below it — three times, automatically.
for i in range(3):
print("Roar!")Output
Roar!
Roar!
Roar!Change the number, change the count. No copy-pasting needed.
for i in range(5):
print("Flap!")Output
Flap!
Flap!
Flap!
Flap!
Flap!i is the loop's own counter — it changes every single time the loop runs.
for i in range(4):
print(i)Output
0
1
2
3A loop isn't just 'repeat this text' — it's 'run this code, with a different i each time.'
Check your understanding
for i in range(3): print("Go!") — does i actually change anything here?
for i in range(3):
print("Go!")Why: i really does become 0, then 1, then 2 — but this code never uses i, so you can't tell from the output. The loop is still doing real work each pass, even when that work happens to look identical.
What you'll practice
Make the dragon roar exactly 3 times — one roar per line. Use a loop, not three separate prints.
More from this topic
Doing something many times is one lesson inside Python for Loops and range() for Kids — see the full lesson order and what the whole topic covers.
View the full topic →