Learning Goals 3 min
By the end of this lesson you will be able to:
- Drag a repeat (10) c-block onto the Script Area and snap a body block inside its mouth.
- Replace ten identical move (10) steps blocks with one repeat (10) loop.
- Click the green flag and watch the cat trace a square-shaped path on the Stage.
Warm-Up 7 min
Last lesson (Arc 4/8), you learnt wait (1) seconds — waits pace the cat's moves so you can see each one. Today the cat joins the dance party. Arc 5/8 adds the next move: a block that repeats the blocks inside it.
Quick-fire puzzle
Faiz built this tall stack. He clicked the green flag. How far did the cat move in total?
when flag clicked
move (10) steps
move (10) steps
move (10) steps
move (10) steps
move (10) steps
Reveal the answer
The cat moved 50 steps in total — five jumps of ten steps each, one after the other, so fast it looks like one smooth slide. The stack works. But look at it — five blocks all saying the exact same thing. If the teacher asked for fifty moves, you'd be dragging blocks all afternoon. There must be a smarter way. There is.
New Concept — the repeat (10) c-block 15 min
Think of repeat (10) as a megaphone for blocks. Whatever blocks you drop inside its mouth, it shouts them out ten times, one after the other. You write the instruction once. The computer runs it ten times.
Blocks reference
| Block | Category | What it does |
|---|---|---|
| repeat (10) | Control | Runs the blocks inside its mouth ten times. The number is editable — try (4), (20), or any whole number. |
| move (10) steps | Motion | Same block as before. Moves the sprite forward by the number you set. |
| turn cw (15) degrees | Motion | Rotates the sprite clockwise. Used inside loops to trace shapes. |
The shape of a c-block
A c-block is shaped like the letter C — open on the right with a notch at the top and bottom. The opening is called the mouth. Drop other blocks inside the mouth, and they become the loop's body.
repeat (10)
move (10) steps
end
end closes the mouth — written below to the same indent as the c-block itself.Two important details:
- The body block is indented two spaces. That tells Scratch the block belongs inside the loop's mouth.
- The c-block always closes with
end. You won't see the word "end" in the real editor — it just shows the bottom of the C-shape closing back up. But when we write blocks as text,endtells the renderer where the mouth stops.
Five moves → one loop
Remember Faiz's stack from the Warm-Up? Five copies of the same block. Here's the same idea, written as a loop:
when flag clicked
repeat (5)
move (10) steps
end
Want ten moves instead of five? Change the (5) to (10). Want a hundred? Change it to (100). One small edit replaces ninety-five drag-and-drops.
Why it matters
Loops are everywhere in coding. Anything you'd do "a few times in a row" — flap a bird's wings, drop ten apples from the sky, draw twelve sides of a clock face — uses a loop. repeat (10) is the simplest one. It will be the engine of half your projects from today onwards.
Worked Example — trace a square path 15 min
Open Scratch. Make sure the cat is at the centre (x = 0, y = 0) and facing right (Direction = 90). We'll loop a four-step pattern four times to draw an invisible square — a path of moves and turns.
Step 1 — Start with the hat block
Drag when ⚑ clicked from Events into the Script Area.
Step 2 — Find the orange Control category
In the Blocks Panel, click the orange dot — Control. You'll see wait (1) seconds from last lesson, and just below it the new c-block: repeat (10).
Step 3 — Drag the repeat block
Grab repeat (10). Drag it under the hat block. Snap. The mouth is now waiting for body blocks.
Step 4 — Change the number to 4
Click on the white 10 in the loop. Type 4. Press Enter. Now the loop will run four times.
Step 5 — Drop one move block into the mouth
Grab move (50) steps from Motion. Drag it slowly into the mouth of the loop — the inside of the C. A white highlight appears. Drop it.
Step 6 — Add a turn block under the move (still inside the mouth)
Grab turn cw (15) degrees from Motion. Edit the (15) to 90. Drop it under the move block, still inside the loop's mouth. Both blocks are now the loop's body.
when flag clicked
repeat (4)
move (50) steps
turn cw (90) degrees
end
Step 7 — Click the green flag
The cat moves 50 steps right, turns 90 degrees, moves 50 steps down, turns 90 degrees, moves 50 steps left, turns, moves 50 steps up. It returns to where it started — having traced a 50 × 50 square.
What changed: instead of writing eight blocks (four moves + four turns), you wrote two blocks inside one loop. Less code. Same square. And if you want a hexagon next week? Change the (4) to (6) and the (90) to (60).
The full assembled stack (your reference)
when flag clicked
repeat (4)
move (50) steps
turn cw (90) degrees
end
Try It Yourself — three small builds 12 min
Goal: Make the cat hop right ten times. Build this stack and click the flag. Count along.
when flag clicked
repeat (10)
move (10) steps
end
Think: Ten loops × ten steps each = 100 steps. The cat ends up where a single move (100) steps would have put it. Same destination — different journey.
Goal: Make the cat dance on the spot — wiggle left-right ten times. Place a tiny pause inside the loop so you can see each wiggle.
when flag clicked
repeat (10)
move (10) steps
wait (0.2) seconds
move (-10) steps
wait (0.2) seconds
end
Think: A negative number in move (-10) steps moves the cat backwards. The two waits give your eyes a chance to keep up. Without the waits, the wiggles happen too fast to see.
Goal: Trace a triangle. Three sides, three corners. The outside angle of an equilateral triangle is 120 degrees, not 90. Loop accordingly.
when flag clicked
repeat (3)
move (80) steps
turn cw (120) degrees
end
Think: Three sides × 120 degrees = 360 degrees total — one full turn, back to the start. The maths trick: 360 / number-of-sides gives the turn angle for any regular polygon. Pentagon? 360 / 5 = 72.
Mini-Challenge — countdown then jump 5 min
"Cat says a number, then takes a step — three times"
Combine today's repeat (10) with last lesson's wait (1) seconds and the say [...] for (1) seconds block from earlier. Make the cat count down "3", "2", "1" — and step forward after each number.
It works if:
- You click the green flag once.
- The cat shows the same say-then-move pattern three times.
- You only used one repeat (10) block (not three).
Reveal one valid solution
This one is a bit cheeky — every loop iteration says "Step!" rather than a different number each time. (Different-numbers-per-loop needs a variable, which arrives in SCR-L01-40.) For now, three identical steps is enough.
when flag clicked
repeat (3)
say [Step!] for (1) seconds
move (40) steps
end
The cat says "Step!", moves 40 pixels, says "Step!" again, moves 40 more, says "Step!" once more, moves 40 more. Total journey: 120 pixels right, with three little speech bubbles along the way.
Recap 2 min
Today you met your first c-block: repeat (10). It has a mouth that holds a body of blocks, and it runs that body the given number of times. One loop replaces many copies of the same block. You used it to trace a square — and any regular polygon — by mixing moves and turns inside the loop.
- Loop
- A block that runs other blocks more than once. The body runs over and over until the loop stops.
- repeat (10) (block)
- A Control c-block that runs the blocks inside its mouth N times, then carries on with the blocks below.
- c-block
- A block shaped like the letter C, with a mouth that holds a body of other blocks. repeat (10) is your first.
- Body (of a loop)
- The blocks that sit inside the c-block's mouth. They are the instructions that get repeated.
Homework 1 min
The 36-corner star. Build a loop that makes the cat trace a star-like flower pattern. The cat will turn 10 degrees after each tiny step — 36 times.
- Open Scratch. Make sure the cat sits at the centre (x =
0, y =0). - Build this stack:
when flag clicked
repeat (36)
move (20) steps
turn cw (10) degrees
end
Bring back next class:
- A screenshot of your Script Area showing the four-block stack.
- Your written answer to this question: "36 × 10 = 360 degrees. That's a full circle. So why doesn't the cat end up exactly where it started?" (Hint: it does — but the path it walks is not a circle. What shape is it?)
Heads up for next class: SCR-L01-20 introduces the forever loop — the loop that never stops on its own. The red stop button becomes your new best friend.