Computers do exactly what they are told, not what we meant. This activity teaches that lesson in the most memorable way possible, with no screens at all.

  • Ages: 6–12
  • Time: 20 minutes
  • Skill: Writing precise algorithms

What you need

  • Bread, a spread and a knife (or pretend items)
  • Paper and a pencil
  • A parent willing to be a robot

Step by step

  1. Explain the job. Your child is the programmer. The parent is a robot that does exactly what it is told: nothing more.
  2. Write the instructions. Your child writes numbered steps for making a sandwich.
  3. Run the program. The robot follows each step literally. "Put butter on the bread" the robot puts the whole tub on top of the loaf.
  4. Find the bug. Stop when something goes wrong. Which step was unclear?
  5. Fix and re-run. Rewrite the step to be more precise, and try again.
  6. Celebrate. Keep going until the robot makes a sandwich successfully.

What your child learns

An algorithm is a precise set of steps. A bug is a mistake in the steps. Debugging is finding and fixing it. These are the core ideas of all programming.

Make it easier or harder

  • Easier: make a glass of water instead.
  • Harder: add a condition: "If there is no butter, use jam."

Enjoyed it? Book a free coding demo class, or see Fun with Coding for year-round coding.

Frequently asked questions

What is an unplugged coding activity?
An activity that teaches coding ideas, such as algorithms and debugging, without using a computer.

What age is the robot sandwich activity for?
About 6 to 12. Younger children can say the steps aloud while an adult writes them.