What is a program?

Knowledge Videos

Short animated explainers, organised by subject.

What is a program?

A program is a list of exact instructions the computer follows in order. Algorithm, sequence and bug, explained with a robot that makes a sandwich.

Transcript

A program is a list of instructions that tells a computer exactly what to do.

The computer follows the instructions one at a time, from the top to the bottom. A set of steps that solves a problem is called an algorithm.

The order of the steps is called the sequence. Here a robot makes a sandwich: bread, cheese, bread. Follow the steps in order, and you get a sandwich.

A computer does exactly what you say, and nothing more. Swap two steps, and the cheese ends up at the bottom. Leave a step out, and there is no cheese at all.

A mistake in a program is called a bug. Programmers write clear steps, run them, and check the result.

Remember: a program is a list of instructions, an algorithm is the steps that solve a problem, and the sequence is the order they run in. The computer does exactly what you tell it.

More in this series