Example 1
Byte faces right. The star is 3 squares ahead. What is the algorithm?
- Count the squares between Byte and the star: 3.
- One move forward for each square.
- move forward, move forward, move forward.
Answer: 3 × move forward
🧩 Block coding, Grade 5 · session 1 of 14 · 60 minutes · free
Computers follow instructions exactly, one after another. An algorithm is a list of exact steps; a sequence is the order you put them in. Get the order wrong and Byte bumps into a wall!
A complete lesson · 60 minutes
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.
Grade 5 · ages 9 to 11 · beginner
Warm-up · think first
If you say "put jam on the bread" without "open the jar", I cannot! Computers are the same: every step must be said, in the right order.
Teacher tip: Act it out with real or pretend bread and follow the steps too literally. Children love catching the missing step.
Part 1 of 3 · learn, see, practise
An algorithm is a set of step-by-step instructions to do a job, like a recipe.
A computer cannot guess. It does exactly what each step says, so every step must be clear.
In the maze, Byte knows only three steps: move forward, turn left and turn right.
Byte faces right. The star is 3 squares ahead. What is the algorithm?
Answer: 3 × move forward
Start with the warm-up and go as far as you can. The stretch questions are meant to be hard.
Part 2 of 3 · learn, see, practise
Turn left and turn right only turn Byte on the spot. They do not move it.
Left and right are Byte's left and right, not yours. Pretend you are Byte, facing the same way.
When Byte faces down the screen, its right is your left!
Byte faces right. The path goes on and then down. What does Byte do at the corner?
Answer: move, move, turn right, move, move
Start with the warm-up and go as far as you can. The stretch questions are meant to be hard.
Part 3 of 3 · learn, see, practise
A bug is a mistake in a program. Debugging means finding it and fixing it.
Run the program in your head, one block at a time, with your finger on Byte.
Stop at the first block where Byte goes the wrong way: that is the bug.
This program crashes Byte into a wall. Which block is the bug?
Answer: Block 3 (turn left should be turn right)
Start with the warm-up and go as far as you can. The stretch questions are meant to be hard.
Watch out
Stand up and face the same way as Byte; then turn your own body.
A turn only spins Byte on the spot; add a move forward after it.
Find the first wrong block and change only that one.
🖥️ Practical · puzzles 1–5
Now try it for real. Open the puzzles in a new tab and share that tab, then come back here for the activities and quiz.
▶ Open the puzzles on code.org ↗code.org is a free, non-profit coding site. Its puzzles open in your browser; an account is optional and only saves progress.
Class activity 1 of 3
The learner gives you instructions to walk from your chair to the door. You follow them exactly, like a robot.
🙌 No screen needed: play it together, step by step.
Class activity 2 of 3
Write each program as arrows: ↑ move forward, ↺ turn left, ↻ turn right.
Class activity 3 of 3
Each morning routine has one step in the wrong place. Find the step that should come first.
After class · project
Draw a maze on squared paper and write the program to solve it.
What to make: A paper maze with a tested program.
Stretch: Make a second maze that needs exactly 2 turns.
| Look for | Done well when |
|---|---|
| Maze | Clear walls, start and star |
| Program | Reaches the star with no crash |
Copy it onto paper or print the practice sheet.
My maze (draw it on squared paper) Byte starts facing: ______ My program: ______________________________ Number of blocks: ___ Tested by: ______ Did it work? ___
Homework
Try each on paper, then tap to see the answer and working. Or print the practice sheet.
Toothpaste on the brush, brush the top teeth, brush the bottom teeth, rinse, put the brush away.
6
Right
Any maze where the path goes 2 squares, then turns to Byte's left for 1 square.
🔥 Challenge round · finished early?
Cover the notes and try these from memory. They are meant to make you think hard: draw, try small cases, and check your answer.
Solve the corner maze using only turn left blocks for turning. How many turn lefts make one turn right?
Talk it through or use the drawing board. There is more than one way to get there.
Quiz · 8 questions
Pick an answer to see if it is right and why. Your best score is saved on this device.
🖨 Print what we learned
Pick what to practise, then print it or choose Save as PDF in the print window to download it.
For parents and teachers
Use it as it is, or stretch any part over two sessions. Each row links to the part of the page you need.
| Time | Part | The teacher | The learner |
|---|---|---|---|
| 0–4 min | Warm-up | Ask the warm-up question; let them act it out. | Guess, then explain. |
| 4–11 min | Algorithms | Explain with the comic, reveal the example, then the practice. | Practise; try the star question. |
| 11–18 min | Turning | Explain, trace the example with a finger on the screen, then the practice. | Practise. |
| 18–25 min | Debugging | Explain and show the example, then the practice. | Practise. |
| 25–43 min | code.org practical: puzzles 1–5 | Share the code.org tab. Let the learner drive; ask them to say each block out loud before Run. | Solve the puzzles; say the plan first. |
| 43–47 min | Activity 1 | An unplugged game: get the learner moving. | Play the robot. |
| 47–51 min | Activity 2 | Do the first item together. | Finish the activity. |
| 51–54 min | Activity 3 | Quick puzzle; set the rest as homework if time is short. | Solve and check. |
| 54–59 min | Quiz | Read each question aloud; the learner taps and reads why. | Answer and explain. |
| 59–60 min | Set the project | Show the template and agree a day to share it. | Start the project. |
Put a small arrow sticker on the screen showing Byte's direction, and let the learner turn their own body.
Solve the corner maze using only turn left blocks for turning. How many turn lefts make one turn right?
FAQ
A list of exact, step-by-step instructions to do a job, like a recipe or directions to a friend's house.
Yes. The Classic Maze puzzles are free and work in a browser without an account; an account only saves progress.
Because the character's left and right change with the way it faces. Turning their own body to match helps a lot.
Start a conversation
Tell us the learner's age and level. A teacher from our network teaches with these lessons; we confirm timing and price first.