🧩 Scratch · session 2 of 18 · 45 minutes · free

Sequences: tell a story in the right order

The fox has a treasure map! But a sprite only does exactly what the blocks say, in exactly that order. Today you write the steps to the treasure, catch a sneaky bug, and discover the loop: the coder's shortcut.

Illustration of a cute pastel robot dancing
Illustration: andremsdesign / Pixabay

A complete lesson · 45 minutes

Teach it, see it, practise it, all on this page.

Open this page with your learner and work down it, or press Teach this lesson to go through it one step at a time on a big screen. Every section has something to do.

See the teacher's plan
  1. Warm-up games4 min
  2. Morning in order2 min
  3. Treasure map6 min
  4. Sequences8 min
  5. Catch the bug8 min
  6. Loops9 min
  7. Watch out1 min
  8. Quiz4 min
  9. Treasure hunt story2 min
  10. Homework1 min

By the end you can

  • Put blocks in the right order to reach a place on the stage (a sequence)
  • Find the block that is wrong and fix it (debugging)
  • Use a repeat block instead of building the same blocks again (a loop)
  • Tell a short story with say blocks in the right order

Before you start

  • Lesson 1: the stage, sprites, x and y, and the green flag
  • Knowing left from right

Have ready

  • A computer or tablet
  • This page (the Block Studio works here)
  • Scratch (scratch.mit.edu), if you have an account
  • Paper, a pencil and a small toy for the treasure map game

Ages 7 to 10 · Primary 2 to 5 · beginner

Warm-up · think first

Getting ready for school: put these in order. Shoes on, wake up, eat breakfast, open the door.

Show the answer

Wake up, eat breakfast, shoes on, open the door. A different order makes a silly morning, like opening the door before you wake up!

Teacher tip: Ask for the silliest wrong order they can think of.

More warm-ups for every class →

🎮 Warm-up games · 5 quick games

Play with Bolt the robot

Five minutes of coding warm-ups. Vote, say why, then show the answer.

  1. Swapping two blocks changes what the sprite does. (Always · Sometimes · Never)
    Answer: Sometimes — Sometimes: move then turn ends somewhere different from turn then move, but swapping two 'move 10' blocks changes nothing. Order often matters!
  2. Which one is NOT a step in brushing your teeth? (Put toothpaste on · Brush · Feed the cat · Rinse)
    Answer: Feed the cat: the other three are steps in the right order.
  3. A robot faces the door. 'Turn right, walk 2 steps.' Did it reach the door?
    Answer: No: it turned away from the door first. The fix: walk 2 steps, and no turn.
  4. Would you rather find a bug in your code or never make a mistake? (Find a bug · Never make a mistake)
    Answer: Every coder makes bugs. Finding and fixing them is called debugging, and it's a superpower.
  5. Clap 4 times. Now: what is a short way to tell someone that?
    Answer: 'Repeat 4: clap.' That's a loop: say the step once and how many times.

Three levels, like a real engineer

Use it. Tweak it. Build it.

First use what the lesson shows exactly as it is, then change one key thing and see what happens, then make your own.

  1. 🔒

    Level 1 · Use it

    Run the treasure path

    Run the treasure path exactly as it is: go to the middle, move 100, turn ↺ 90, move 100. Watch the fox land on the ⭐ and say Found it!

  2. 🔧

    Level 2 · Tweak it

    Change one move

    Change the second move from 100 to 50. Predict where the fox stops now: on the ⭐, below it or above it? Then run it and check.

  3. 🛠️

    Level 3 · Build it

    Your own treasure hunt

    Make your own path to a treasure with at least four blocks, then add a repeat for a victory dance. Test it, and if it misses, find the bug and fix one block.

🗺️ Play the Lesson QuestThree worlds, one for each level, with short stages that bring back what you miss.

Part 1 of 3 · learn, see, practise

Sequences: steps in the right order

A sequence is a list of steps in the right order. Scratch runs the blocks from the top to the bottom, one at a time, and never skips one.

The fox faces right at the start, so 'move' goes right. 'turn ↺' turns it to the left (anticlockwise), so after turn ↺ 90 it faces up. 'turn ↻' turns it to the right (clockwise), so after turn ↻ 90 it faces down.

A story is a sequence too: the say blocks must come in the right order or the story makes no sense.

Example 1

The ⭐ is up and to the right. Predict: where does this script take the fox?

when ⚑ clicked
go to x: 0 y: 0
point in direction 90
move 100 steps
turn ↺ 90 degrees
move 100 steps
say Found it! for 2 seconds
  1. Start in the middle, facing right.
  2. Move 100: the fox goes right.
  3. Turn ↺ 90: now it faces up.
  4. Move 100: it goes up and lands on the ⭐, then says Found it!

Answer: To the ⭐ at x: 100, y: 100

Example 2

What if we swap the order: turn ↺ 90 first, then move 100, then move 100?

  1. Turn first: it faces up.
  2. Then both moves go up: 200 steps up.
  3. It never goes right, so it misses the ⭐.

Answer: Straight up: the order changed where it went

The treasure path

Press the flag. The fox only goes right! Add a turn and another move to reach the ⭐, then make it say Found it!

  1. Predict, then press the green flag.
  2. Add a turn block.
  3. Reach the ⭐ treasure.
  4. Make the fox say something new at the end.

Practise it

Start with the warm-up and go as far as you can. The stretch questions are meant to be hard.

Warm-up

Warm-up

Core

Core

Stretch 🔥

Stretch 🔥

Answers (for the teacher)
  1. sequence | a sequence | algorithm | an algorithm
  2. right
  3. up
  4. 100
  5. 50
  6. turn ↺ | ↺ | left | turn left | anticlockwise

Part 2 of 3 · learn, see, practise

Debugging: catch the bug

A bug is a mistake in the code. Debugging means finding the mistake and fixing it. Every coder does it, every day.

Be a detective: run the code, watch where it goes wrong, and find the FIRST block where it did something you didn't want.

Fix one block at a time, then run it again to check.

Example 1

This script should reach the ⭐ at x: 100, y: 100. Run it in your head: where does it go?

when ⚑ clicked
go to x: 0 y: 0
point in direction 90
say Treasure, here I come! for 1 seconds
move 100 steps
turn ↻ 90 degrees
move 100 steps
  1. It says Treasure, here I come!
  2. Move 100: it goes right. Good so far.
  3. Turn ↻ 90: it now faces DOWN. That's the bug!
  4. Move 100: it ends at x: 100, y: -100, below the middle.

Answer: It ends below the ⭐ (y: -100): the turn goes the wrong way

Example 2

How do we fix it?

  1. Only one block is wrong: the turn.
  2. Swap turn ↻ 90 for turn ↺ 90.
  3. Run it again: now it reaches the ⭐.

Answer: Change turn ↻ 90 to turn ↺ 90

Fix the buggy treasure hunt

This script has a bug! Run it, watch where the fox goes wrong, fix ONE block and run it again.

  1. Run the buggy script and watch.
  2. Change a block to fix the bug.
  3. Reach the ⭐ treasure.
  4. Add a pop sound when it arrives.

Practise it

Start with the warm-up and go as far as you can. The stretch questions are meant to be hard.

Warm-up

Warm-up

Core

Core

Stretch 🔥

Stretch 🔥

Answers (for the teacher)
  1. bug | a bug
  2. debugging | debug
  3. -100 | minus 100
  4. wrong order | order | the order
  5. turn ↺ 90 | ↺ 90 | turn left 90 | turn ↺
  6. 1 | one

Part 3 of 3 · learn, see, practise

Loops: the coder's shortcut

A loop runs the same blocks again and again. In Scratch the repeat block is a loop: repeat 3 runs the blocks inside it three times.

If you see the same blocks built over and over, put them inside a repeat once. Shorter code is easier to read and to fix.

Loops make patterns: stairs, shapes and dances. With the pen down, repeat 3 of move 100 and turn ↺ 120 draws a triangle.

Example 1

The ⭐ is at the top of the stairs. Predict: where does this loop take the fox?

when ⚑ clicked
go to x: 0 y: 0
point in direction 90
repeat 3
move 50 steps
turn ↺ 90 degrees
move 50 steps
turn ↻ 90 degrees
  1. Inside the loop: move 50 (right), turn ↺ 90 (face up), move 50 (up), turn ↻ 90 (face right again).
  2. Each time round, one stair: 50 right and 50 up.
  3. Three times round: 150 right and 150 up.

Answer: Up three stairs to x: 150, y: 150

Example 2

Predict: what does this draw?

when ⚑ clicked
go to x: 0 y: 0
point in direction 90
pen down
repeat 3
move 100 steps
turn ↺ 120 degrees
  1. Pen down: the fox draws as it moves.
  2. Three times: move 100, then turn ↺ 120.
  3. Three equal sides, and the three turns add up to 360 degrees.

Answer: A triangle

Climb the stairs, then draw

Run the stairs loop to the ⭐. Then change it: repeat 2? Bigger steps? Then draw a triangle with the pen.

  1. Run the stairs loop.
  2. Use a repeat block.
  3. Climb to the ⭐ treasure.
  4. Draw a triangle with the pen.

Practise it

Start with the warm-up and go as far as you can. The stretch questions are meant to be hard.

Warm-up

Warm-up

Core

Core

Stretch 🔥

Stretch 🔥

Answers (for the teacher)
  1. 150
  2. repeat | a repeat | the repeat block | loop | a loop
  3. 150
  4. 360
  5. 60
  6. 100

Watch out

Common mistakes

Turning the wrong way

turn ↺ is to the left (anticlockwise) and turn ↻ is to the right (clockwise). Point with your finger before you choose.

Starting from the wrong place

The sprite stays where the last run ended. Start the script with 'go to x: 0 y: 0' and 'point in direction 90'.

Fixing everything at once

Change ONE block, then run it again. Then you know which change fixed it.

Building the same blocks again and again

If blocks repeat, put them inside a repeat block once.

Class activity 1 of 3

Treasure map (no computer)

Hide a small toy on a table grid. One person is the coder, one is the robot.

  1. Draw a 4 by 4 grid on paper and put the toy (the treasure) on one square.
  2. The coder writes the steps with arrow cards: forward, turn left, turn right.
  3. The robot follows them EXACTLY. Missed the treasure? Find the bug and fix one card.

🙌 No screen needed: play it together, step by step.

Class activity 2 of 3

Bug hunt

Swap scripts with a partner: each of you hides ONE bug in a working treasure path.

  1. Make a script that reaches the ⭐.
  2. Change one block to make a bug (a wrong turn, a wrong number or a missing block).
  3. Swap. Run it, find the bug, fix it, and tell your partner which block it was.

🙌 No screen needed: play it together, step by step.

Class activity 3 of 3

Loop it

Turn a long script into a short one.

  1. Build move 50, turn ↺ 90, move 50, turn ↻ 90 three times without a loop. Count the blocks.
  2. Now put one copy inside repeat 3. Count again.
  3. Which was quicker to build, and which is easier to fix?

🙌 No screen needed: play it together, step by step.

After class · project

The fox's treasure hunt

A short story: the fox reads the map, follows a path in the right order, and celebrates at the treasure with a loop.

What to make: A treasure-hunt script with a story, a path in the right order and a repeat.

Stretch: Put the treasure somewhere harder (up, then left, then up again) and add a second sprite who gives the fox a clue.

How it is marked

Look forDone well when
Right orderThe fox reaches the treasure because the blocks are in the right order
Tells a storyAt least two say blocks that make sense in order
DebuggedYou found and fixed at least one bug while building
LoopsA repeat block makes the celebration

Project template

Copy it onto paper or print the practice sheet.

1. when ⚑ clicked
2. go to x: 0 y: 0 · point in direction 90
3. say: 'I'm looking for ______!'
4. move ___ · turn ___ · move ___
5. say: 'Found it!'
6. repeat ___ : a little dance

Homework

Practise at home

Try each on paper, then tap to see the answer and working. Or print the practice sheet.

  1. From the middle, facing right: move 100, turn ↺ 90, move 50. What is y at the end?

    50

  2. repeat 4 with 'move 25 steps' inside: how many steps altogether?

    100

  3. Which way does turn ↻ turn: clockwise or anticlockwise?

    clockwise

  4. A square has 4 turns. How many degrees is each turn?

    90

🔥 Challenge round · finished early?

The hardest questions of the lesson, no notes

Cover the notes and try these from memory. They are meant to make you think hard: draw, try small cases, and check your answer.

Stretch 🔥

Stretch 🔥

Stretch 🔥

Stretch 🔥

Stretch 🔥

Stretch 🔥

Answers (for the teacher)
  1. 50
  2. turn ↺ | ↺ | left | turn left | anticlockwise
  3. turn ↺ 90 | ↺ 90 | turn left 90 | turn ↺
  4. 1 | one
  5. 60
  6. 100

🧠 Think-hard question

Draw a hexagon (repeat 6, move 60, turn 60), then a star (repeat 5, move 100, turn ↻ 144).

Talk it through or use the drawing board. There is more than one way to get there.

Quiz · 8 questions

Final quiz: check what you learned

Pick an answer to see if it is right and why. Your best score is saved on this device.

1What is a sequence?
Show the answer

Steps in the right order. A sequence is a list of steps in order. Scratch runs them from top to bottom.

2The fox faces right. Which block makes it face up?
Show the answer

turn ↺ 90. turn ↺ 90 turns anticlockwise, from facing right to facing up.

3Where does this script take the fox?
when ⚑ clicked
go to x: 0 y: 0
point in direction 90
move 100 steps
turn ↺ 90 degrees
move 100 steps
say Found it! for 2 seconds
Show the answer

To x: 100, y: 100. Right 100, turn to face up, up 100.

4What is a bug?
Show the answer

A mistake in the code. A bug is a mistake; debugging is finding and fixing it.

5This script should reach x: 100, y: 100. Which block is the bug?
when ⚑ clicked
go to x: 0 y: 0
point in direction 90
say Treasure, here I come! for 1 seconds
move 100 steps
turn ↻ 90 degrees
move 100 steps
Show the answer

turn ↻ 90. turn ↻ 90 makes the fox face down, so it ends at y: -100.

6repeat 3 with 'move 50 steps' inside moves the fox…
Show the answer

150 steps. Three times 50 steps is 150.

7What does this draw?
when ⚑ clicked
go to x: 0 y: 0
point in direction 90
pen down
repeat 3
move 100 steps
turn ↺ 120 degrees
Show the answer

A triangle. Three equal sides with three 120-degree turns make a triangle.

8Why use a repeat block?
Show the answer

So you don't build the same blocks again and again. A loop says the steps once and how many times: shorter and easier to fix.

🖨 Print what we learned

Make a worksheet from this lesson

Pick what to practise, then print it or choose Save as PDF in the print window to download it.

Include
Options

For parents and teachers

The 45-minute lesson plan

Use it as it is, or stretch any part over two sessions. Each row links to the part of the page you need.

TimePartThe teacherThe learner
0–4 minWarm-up gamesTwo or three quick coding warm-ups.Vote and explain.
4–6 minMorning in orderPut the morning steps in order; find a silly wrong order.Say the right order.
6–12 minTreasure mapUnplugged: arrow cards and a toy on a grid.Debug the cards.
12–20 minSequencesPredict, then add a turn and a move to reach the ⭐.Reach the treasure and say Found it!
20–28 minCatch the bugRun the buggy script; find the first wrong block.Fix one block and run again.
28–37 minLoopsClimb the stairs with repeat; then draw a triangle.Change the repeat and predict.
37–38 minWatch outWhich mistake did you nearly make?Spot it.
38–42 minQuizEight quick questions.Answer and read why.
42–44 minTreasure hunt storyPlan the story and the path.Start building.
44–45 minHomeworkFinish the treasure hunt story.Share it next class.

Questions to ask

  • Why does the order of the blocks matter?
  • How did you find the bug?
  • Which way does turn ↺ go?
  • When should you use a repeat block?

If it feels hard

Give the learner a paper arrow to hold and turn with the fox: point right at the start, then turn the arrow for every turn block before running it.

If it feels easy

Draw a hexagon (repeat 6, move 60, turn 60), then a star (repeat 5, move 100, turn ↻ 144).

FAQ

Sequences: tell a story in the right order: questions

Is this like code.org?

It follows the same early ideas that code.org's courses and many school courses teach at this age: sequences, debugging and loops. The puzzles, stories and wording here are our own.

Does it work in real Scratch?

Yes. Every block here is a real Scratch block, so learners can build the same scripts at scratch.mit.edu.

What age is it for?

Ages 7 to 10 (Grades 2 to 4). Younger learners can do the unplugged treasure map with a grown-up.

Start a conversation

Want a teacher to take this class?

Tell us the learner's age and level. A teacher from our network teaches with these lessons; we confirm timing and price first.

  • Tell us the learner’s age or grade and goals
  • We’ll suggest a suitable class or learning path
  • We’ll confirm format, timing and fees with a parent or guardian

For a child’s class, please have a parent or guardian send the enquiry. Avoid sharing passwords or sensitive personal details.

We’ll use your details only to respond to this request.

Chat on WhatsApp
Esc

Try