Writing algorithms

About this lesson: Writing algorithms

In short

An algorithm is a set of precise steps that completes a task. A computer follows instructions exactly; it can't guess what you meant. Give the robot a vague instruction, then precise ones.

Writing algorithms

What you'll explore

Precise instructions: Say exactly what you mean
An algorithm is a set of precise steps that completes a task. A computer follows instructions exactly; it can't guess what you meant.
Start, finish, order: Steps in the right order
A good algorithm has a clear START and STOP, and its steps run in order: this is called sequence.
Pseudocode: Input, store, output
Pseudocode is a clear way to write algorithms. INPUT gets a value, ← stores a value in a variable, OUTPUT shows it.
Check yourself: Spot the precise step
A robot must water a plant on a table 2 m in front of it.

Also in this lesson

  • Common mix-ups
  • The words you need
  • One algorithm, many answers
  • Robot friend

Words to know

algorithm
A set of precise steps that completes a task.
sequence
Running steps one after another, in order.
pseudocode
A way to write algorithms that looks like code but is meant for people.
input
A value given to an algorithm.
output
A value an algorithm gives back or shows.
variable
A named place in memory that holds a value.
assignment
Storing a value in a variable, written ←.

Sources

  • BBC Bitesize KS3 Computing: Algorithms

An interactive lesson with a live experiment: move the sliders, press the buttons and answer quick questions. 4 short steps and a 6-question quiz. Part of the Family plan. Written and checked by Shalo Lab. Last updated 11 November 2026.

← Threats and protection · Tracing and predicting →

All lessons in Term 1 · Computing · Age 12