Lesson 1 of 3
Repeat without getting tired
Copy-pasting the same line ten times is slow and fragile. Loops do the work for you!
for i in range(3): repeats the indented lines below it 3 times. The indentation tells Python what belongs to the loop.
for i in range(3):
print("Again!")🎯 Your mission
The crowd is cheering for your hero! Print the message Hip hip hooray! exactly 3 times using a for loop with range(3).
PRO lesson
This advanced chapter is part of CodeAge PRO. Unlock it to keep your adventure going.
Discover PRO →