computer4kids is now ComputerLeap. Same free lessons, same team. Read why we changed our name

← All lessons · 🧑‍💻 Coding Academy

🔁

🎓

⏱ 10 min

Free

Again and Again

Why say it ten times? Loops tell the computer to repeat steps — super useful!

🎯 What you will learn

  • A loop repeats steps
  • Loops make code shorter
  • Spotting patterns that repeat

👋 Let’s get started!

Imagine telling Robo “jump, jump, jump, jump, jump…” 100 times! 😵 Instead, coders say “repeat jump 100 times”. That’s called a LOOP!

🪜 Step by step

1. 🔄 What is a loop?

A loop repeats the same steps again and again. It saves lots of work!

2. 🔍 Find the pattern

Look for things that repeat: clap, stomp, clap, stomp… That pattern can be a loop!

3. 🔢 How many times?

A loop needs to know how many times to repeat — like “repeat 3 times”.

🧪 Try it!

Read the code, guess what it prints, then press 👀 Show output.

Robo’s dance loop

repeat 3 times:
    👏 clap
    🦶 stomp

🎨 Unplugged activity

🎵 Make up a dance with a loop: “repeat 4 times: jump, spin”. Teach it to your family!

Brush your teeth with a loop

🪥 Get toothbrush
🧴 Add toothpaste
repeat 10 times:
    ↔️ brush
💦 Rinse

📖 Key words

Tap a card to flip it over!

Loop
Repeating steps 🔁
Repeat
Do it again 🔄
Pattern
Something that happens over and over 🌈

Knowledge Check Quiz

  1. What does a loop do?
  2. “repeat 2 times: hop” — how many hops?
  3. Why do coders use loops?
← Previous lesson
Next lesson →