for Loops: Coding lesson for kids

In this lesson, children learn to write a for loop that repeats an action a set number of times.

for i in range(3):: Repeats the indented block 3 times, with i taking the values 0, 1, 2.

print(i): The INDENTATION (4 spaces) is required — Python uses it to mark lines that belong inside the loop. This prints 0, then 1, then 2.

This lesson is part of Python in Coding at Pearls Valley Academy — Real code, beginner-friendly syntax.

Each lesson starts with a short narrated, animated explanation, then hands-on practice. A wrong answer gets a gentle hint, never a penalty, and children earn stars and pearls as they go.