Star Student Builder logoStar Student Builder
← Explorers TechnologyAlgorithms and bugs20 minutesStd 3–5

Program a Human Robot

✨ Your friend follows your instructions exactly and walks straight into a chair, which is how you find your first bug.

A floor grid with a start square and a target, showing a red buggy path that turns too early and a green corrected path, beside a row of instruction cards with the missing turn card highlighted.
How it works

🧰 You need

  • paper cards with arrows drawn on them
  • chalk or tape to mark a grid of squares
  • an object to be the target
  • a friend to be the robot
  • a pencil

⚠️ Clear the floor of obstacles so the robot cannot trip.

πŸ‘€ What you will see

The robot only does what is written, not what you meant. A single missing turn card sends it off in the wrong direction. Once fixed, the same list of cards works every single time.

πŸ§ͺ Do it

  1. Mark out a grid of large squares on the floor and put the target on one square.
  2. Make cards for forward one square, turn left, turn right and pick up.
  3. Lay your cards in order to send the robot from the start square to the target.
  4. Your friend must obey the cards exactly, doing nothing that is not written.
  5. When the robot goes wrong, find which card caused it and fix just that card.
  6. Swap roles and run your friend's program.

πŸ’‘ Why it happens

A computer follows exact instructions in order and never guesses what you meant. A list of exact steps that finishes a job is called an algorithm, and writing it down as cards is the same idea as writing code. A mistake that makes the program do the wrong thing is called a bug, and finding it by testing step by step is called debugging. Professional programmers spend more time debugging than writing new instructions.

πŸ” Now try this

Add a card that says repeat the next two cards twice, and rewrite the same route using fewer cards.

πŸ€” Think about it

A cooking recipe is also a list of exact steps, so what would a bug in a recipe look like?

🧘 Ask the Acharya

β€œA cooking recipe is also a list of exact steps, so what would a bug in a recipe look like?” β€” ask him and he will explain it from your own chapters.

Ask Guru β†’

More for Std 3–5

Ask GuruAcharya Samayeshwar