Choose a country
Grade 3Computer scienceAlgorithms

Sequence and direction: block programs and finding bugs

Lesson goal: Move an on-screen character with command blocks, run the program, check the result, and find and fix a bug.
← Algorithms

About this lesson

In block programming commands are coloured blocks: “move forward”, “turn left”, “turn right”, “repeat”. We snap them together from top to bottom to make a program. We press “Start” and the character follows the commands in order. If it misses the goal, there is a bug. To find it we check step by step and change only the wrong block.

Lesson goal: Move an on-screen character with command blocks, run the program, check the result, and find and fix a bug.

What the book shows

In computer science the child first learns to think through unplugged games: recognising information, ordering steps and learning safety rules.

Textbook link:

This is not the textbook’s text but a short description of the topic. Check the exact page in your own textbook.

The lesson step by step

  1. 1

    Warm-up5 min

    “Robot teacher” warm-up.

  2. 2

    New topic10 min

    Blocks and programs.

  3. 3

    Practice10 min

    Paper-block programs.

  4. 4

    Game10 min

    “Bug hunter” game.

  5. 5

    Wrap-up5 min

    A bug-free program.

Let’s understand

For the student Simple language

BlockWhat the character does
🟦 move forwardone square ahead
🟨 turn leftturns left
🟨 turn rightturns right
🟩 repeat 3 timesdoes the blocks inside 3 times
🟥 startruns the program
A bug? Don’t worry: programmers find and fix bugs all the time.

Going deeper

Scientific language: for older students, parents and teachers.

There is a famous story that a real moth was once found inside a computer.

Play and check

Building or debugging?

How to write it down

  1. Draw a board with a character, a goal and an obstacle. Write the program as blocks.
  2. Make one mistake and fix it in red.

How the classwork looks in the notebook

15 November1Classwork2🟦 ⬆️ · 🟨 ↩️ ↪️ · 🟩 🔁 · 🟥 ▶️3
Writing order: 1 Date 2 Heading 3 Line 3: 🟦 ⬆️ · 🟨 ↩️ ↪️ · 🟩 🔁 · 🟥 ▶️
Sample: the date and heading follow this country’s notebook rules.

Open notebook

Watch out: common mistakes

Deleting the whole program after a bug. Find and change just the wrong block.
Blocks in a jumble. Programs run from top to bottom.

Where it helps in life

  • Events: “when clicked…”
  • Making a small game

At home

Core

  1. Write a program on a paper board that takes the character to the goal.

Extra ⭐

  1. Give your family a buggy program to fix.

How to do it

  1. Do the task with a grown-up.
  2. Explain in words what you noticed.
Answers for parents

For example: forward ×2, turn right, forward ×3 → goal. The bug: “turn left” should have been “turn right”.

Step-by-step homework solution — Show the solution (try it yourself first)
  1. Find the bug

    1. Program: forward, forward, turn left, forward. The goal is on the right, so “turn left” is the bug; it should be “turn right”.

How the homework looks in the notebook

15 November1Homework2My block program3
Writing order: 1 Date 2 Heading 3 Line 3: My block program
Sample: the date and heading follow this country’s notebook rules.

Check yourself