What is an algorithm? An explanation for children
An algorithm is a list of steps, in the right order, that tells someone or something exactly how to do a job. A recipe is an algorithm, and so are the directions to school. A computer follows its instructions exactly, so the steps have to be clear, with nothing left to guess, and in the right order. When they are not, the result goes wrong: that is a bug.
Free, no account, works on a tablet or whiteboard. Ages 5 to 7.
- 1Pick up your toothbrush
- 2Put toothpaste on the brush
- 3Brush every tooth for two minutes
- 4Spit out the toothpaste
- 5Rinse the brush and put it away
Swap steps 2 and 3 and you brush with no toothpaste. Order matters.
Three things that make a good algorithm
The steps are in order
The same steps in a different order give a different result. Children see this the moment their character turns before it moves instead of after.
Each step is precise
“Go over there” could mean anything. “Move forward two squares, then turn right” means one thing. The curriculum calls this precise and unambiguous.
Nothing is missing
People fill gaps without noticing; computers cannot. A missing “pick up the toothbrush” stops the whole job.
Algorithm
The plan: the steps themselves. You can say it, draw it or write it on paper.
Program
The same plan written so a computer can follow it, as code or a row of instruction blocks.
When an algorithm goes wrong: debugging
Getting it wrong first time is normal, and fixing it is half of computing. Children learn a simple loop:
- Step 1
Predict
Say what will happen before pressing Run.
- Step 2
Run
Watch what really happens, step by step.
- Step 3
Find the bug
Spot the step where it stopped matching the plan.
- Step 4
Fix and run again
Change that one step, then test again.
Free games that practise exactly this

🗺️ Path Finder
Plan Foxy's whole route with arrows, then run it and debug.
Ages 5–7

🤖 Robot Routine
Copy a dance pattern command by command; order matters.
Ages 5–7

🌀 Maze Muncher
Ten mazes with switches, bridges, ice and teleporters to code through.
Ages 6–8

🐞 Build-A-Bug
Design a bug, then program a routine of up to 20 dance moves.
Ages 5–7
Try it at home without a screen
The robot grown-up
Your child gives you instructions to get from the sofa to the door. Follow them exactly, even when they are wrong, and let your child fix the steps.
The sandwich test
Ask for written instructions to make a jam sandwich, then follow them literally. “Put jam on the bread” without opening the jar is a bug worth laughing about.
Back-to-back drawing
Sit back to back. One person describes a simple drawing step by step; the other draws it. Compare: which step was not precise enough?
Algorithms in the curriculum
Algorithms are the first idea in the Key Stage 1 computing curriculum, from Year 1. In Key Stage 2 they grow into programs that make decisions and repeat steps.
On U Teach Mi, children start in Year 1 with Give the Instructions, Fix What's Broken and Spot the Pattern, move to debugging and loops in Year 2 (Fix the Code, Make It Repeat), and work with real code for the first time in Year 3.
- “Understand what algorithms are; how they are implemented as programs on digital devices; and that programs execute by following precise and unambiguous instructions”
- “Create and debug simple programs”
- “Use logical reasoning to predict the behaviour of simple programs”
- “Use sequence, selection, and repetition in programs; work with variables and various forms of input and output”
- “Use logical reasoning to explain how some simple algorithms work and to detect and correct errors in algorithms and programs”
Keep going: algorithms to real code
The free games cover the first step. The membership carries on, with step-by-step courses for every primary year, from giving instructions in Year 1 to writing JavaScript and Python later on.
- 36 coding courses, six for each year from Year 1 to Year 6
- A live online lesson with a teacher, Wednesdays 5–6pm UK time
- Daily Maths & English practice
- A parent dashboard showing what your child has done
£15 a month, up to two children
7 days free, then £15 a month for up to two children (£7.50 a month for each extra child). Card needed; cancel any time.
Questions about algorithms
What is an algorithm in simple words?
A list of steps, in the right order, that tells someone or something how to do a job. If the steps are clear and in the right order, anyone following them gets the same result.
What is an example of an algorithm for kids?
Brushing your teeth, getting dressed, a recipe, or directions to the park. Each is a set of steps that must happen in order. In a coding game, the arrows you line up to move a character to the goal are an algorithm.
What is the difference between an algorithm and a program?
An algorithm is the plan: the steps, which you could say out loud or write on paper. A program is an algorithm written in a way a computer can follow, such as code or a row of instruction blocks.
What does debugging mean?
Finding the mistake (the bug) in an algorithm or program and fixing it. Children test their steps, watch where it goes wrong, change that step and try again.
What are sequence, selection and repetition?
The three ways Key Stage 2 programs are built. Sequence is steps in order. Selection is a decision: if something is true, do this, otherwise do that. Repetition is a loop: do these steps again.