Learning Goals 3 min
By the end of this lesson you will be able to:
- Combine a hat, a reset, a loop, timing and a stop into one complete routine.
- Change one number and predict how the whole routine will change.
- Save the finished project as an
.sb3file ready to show.
Warm-Up 7 min
Everything you need is already in your toolbox. Today is about the arrangement — which blocks run once, which repeat, and which one ends it all.
Quick-fire puzzle
Aisyah built this and complains the cat announces itself over and over. What has gone wrong?
when flag clicked
repeat (8)
say [Let's dance!] for (1) seconds
turn cw (45) degrees
wait (0.2) seconds
end
Reveal the answer
The say block is inside the mouth, so it runs on all eight passes. An opening line should run once, which means it belongs above the loop, not in it.
This is the entire skill of today’s lesson in one mistake: deciding what happens once, what repeats, and what happens at the end.
Project brief — the shape of a routine 15 min
Every performance has the same three parts, whether it is a dance, a song or a school assembly: something that happens once at the start, something that repeats in the middle, and something that happens once at the end.
Three zones, three jobs
| Zone | Where the blocks go | What belongs there |
|---|---|---|
| Set-up | Between the hat and the loop | Reset the position and heading, announce the show. Runs once. |
| The routine | Inside the loop’s mouth | One beat of the dance, plus the wait that gives it rhythm. Runs many times. |
| Curtain call | Below the loop | The bow, the closing line, the stop. Runs once, at the end. |
Designing one beat
The whole routine grows from a single beat, so it is worth thinking about. A beat that returns the cat to where it started can repeat forever; a beat that drifts will eventually walk the cat off the stage.
Eight turns of 45 degrees make a full circle. Four turns of 90 do too. Numbers that divide neatly into 360 are your friends here.
Why this is a project lesson
For seven lessons you learned one block at a time. Today you find out what those blocks are for — and that arranging known pieces well is a different skill from learning new ones.
Guided Build — Aisyah’s cat dances 15 min
We build the routine zone by zone, testing after each — set-up, then the repeating beat, then the curtain call.
Step 1 — Name the performer
Rename the sprite to Aisyah’s Cat in the Sprite Properties bar. A named performer makes the project feel like it belongs to somebody.
Step 2 — Build the set-up zone
Hat, then go to x: (0) y: (0), then point in direction (90). Run it: the cat snaps to the centre facing right, however the last run ended.
Step 3 — Design one beat
Before looping anything, build a single beat by hand and run it a few times.
move (60) steps
turn cw (90) degrees
wait (0.3) seconds
Step 4 — Wrap it in a loop
Fetch repeat (10), change the number to 4, and drag your three beat blocks into its mouth. Snap the loop under the set-up blocks.
when flag clicked
go to x: (0) y: (0)
point in direction (90)
repeat (4)
move (60) steps
turn cw (90) degrees
wait (0.3) seconds
end
Step 5 — Add the curtain call
Below the loop — not inside it — add the bow and the ending.
when flag clicked
go to x: (0) y: (0)
point in direction (90)
repeat (4)
move (60) steps
turn cw (90) degrees
wait (0.3) seconds
end
say [Bagus!] for (2) seconds
Step 6 — Deliberately break it
Drag the say block into the loop’s mouth and run it. The cat now congratulates itself after every single beat. Drag it back out.
Doing this on purpose is worth more than being warned about it — you now know exactly what that bug looks like when it happens to you by accident.
Step 7 — Run it twice
Click the flag, let it finish, click again. Both runs should be identical, because the set-up zone guarantees the same starting conditions.
Step 8 — Change one number
Set the repeat to 8 and the turn to 45. The box becomes an octagon, and the routine takes twice as long. One number, an entirely different dance.
What changed: eight lessons of separate blocks became a routine with a beginning, a middle and an end — which is what a performance actually is.
The full assembled stack (your reference)
when flag clicked
go to x: (0) y: (0)
point in direction (90)
repeat (4)
move (60) steps
turn cw (90) degrees
wait (0.3) seconds
end
say [Bagus!] for (2) seconds
Try It Yourself — extend the routine 12 min
Goal: Turn the box step into an octagon. Two numbers change; nothing else does.
when flag clicked
go to x: (0) y: (0)
point in direction (90)
repeat (8)
move (40) steps
turn cw (45) degrees
wait (0.2) seconds
end
say [Bagus!] for (2) seconds
Think: eight turns of 45 is 360, so the cat still ends facing forward. Try seven turns of 45 and watch the routine drift out of shape.
Goal: Give the show an opening as well as an ending, so it is bookended properly.
when flag clicked
go to x: (0) y: (0)
say [Let's dance!] for (1) seconds
repeat (4)
move (60) steps
turn cw (90) degrees
wait (0.3) seconds
end
say [Bagus!] for (2) seconds
Think: both say blocks sit outside the loop, one above and one below. That is what makes them happen once each rather than four times each.
Mini-mission: a partner who mirrors you. Add a second performer whose routine is the mirror image of the cat’s, so the two dance as a pair rather than separately.
It works if: one flag click starts both, the two routines are clearly mirror images, and both finish at the same moment. Keep each stack within 8 blocks.
Think: which single block do you have to change to mirror a routine — and what has to stay identical if the two are going to finish together?
Mini-Challenge — invent your own beat 5 min
“A routine nobody else has built”
Design a beat of your own — not the box step, not the octagon — and build a routine around it that repeats cleanly and ends where it began.
It works if:
- One flag click runs the whole routine.
- Your beat is genuinely different from the ones in the lesson.
- The routine repeats at least four times and stays on stage throughout.
- The cat finishes on its starting mark, facing its starting direction.
Reveal one valid solution (teacher)
when flag clicked
go to x: (0) y: (0)
point in direction (90)
repeat (6)
move (50) steps
turn cw (60) degrees
wait (0.25) seconds
end
say [Hebat!] for (2) seconds
Six turns of 60 makes a hexagon. The general rule worth drawing out of the class: the number of beats multiplied by the turn angle must come to 360 for the routine to close up.
Recap 2 min
Today you assembled the whole Events and Control cluster into one routine. A hat to start it, set-up blocks that run once, a loop holding a single beat that repeats, and a curtain call below the loop that runs once at the end. Almost every mistake in this lesson was a block sitting in the wrong one of those three zones — and spotting that is a skill you will use in every project from here on.
- Routine
- A sequence of moves with a beat, repeated a set number of times.
- Set-up zone
- The blocks between the hat and the loop. They run once and guarantee a consistent start.
- Curtain call
- The blocks below the loop. They run once, after all the repeating is done.
- Arc
- A run of lessons building one shared project. This one ran eight lessons and ends today.
Homework 1 min
Three routines, one script. Take your finished routine and produce three different dances from it by changing numbers only.
- Open your saved project.
- Make a square version, a hexagon version and an octagon version, changing only the repeat count and the turn angle.
- For each one, write down the two numbers you used and multiply them together.
- Screenshot your favourite version.
when flag clicked
go to x: (0) y: (0)
point in direction (90)
repeat (4)
move (60) steps
turn cw (90) degrees
wait (0.3) seconds
end
say [Bagus!] for (2) seconds
Bring back next class:
- Your screenshot and your three pairs of numbers.
- Your answer to: “All three of your multiplications give the same answer. What is it, and why does that make the routine close up neatly?”
Heads up for next class: SCR-L01-23 opens a new arc — 💬 Cat’s Talking Cartoon. Your cat starts telling stories instead of dancing them.