Girl with her jumper over her jacket after getting dressed in the wrong order.

What is an algorithm?

An algorithm is a list of rules to follow in order to complete a task or solve a problem.

The steps in an algorithm need to be in the right order.

Think about an algorithm for getting dressed in the morning.

What if you put on your coat before your jumper? Your jumper would be on top of your coat and that would be silly!

When you write an algorithm, the order of the instructions is very important.

Girl with her jumper over her jacket after getting dressed in the wrong order.
Back to top

Watch: What is an algorithm?

Back to top

What different types of algorithms are there?

There are lots of different types of algorithms. Let's find out how they help us in everyday life.

Illustrated example of a recipe for making cupcakes

I want to make a cake

The type of algorithm we need to help us complete this task is called a recipe.

A recipe shows us all the steps we need to follow in the right order to make our cake.

You can find this type of algorithm in a cookbook or on a cooking website.

Illustrated example of a recipe for making cupcakes

What would happen if we missed out one of the steps in the recipe?

Mobile phone showing directions to the park

I can't find the park

The type of algorithm we would use to find our way is called a set of directions.

The directions might be a list of instructions telling us where to go, or a line drawn on a map.

There could be different ways to get to the park and there would be a different algorithm for each one.

Mobile phone showing directions to the park

What would happen if you followed the steps in the wrong order?

Computer program needed to get cake

The girl needs to get the cake

The type of algorithm we need to solve this problem is called a computer program.

This computer program is a list of instructions, in the right order, that makes the girl move on the screen.

We use symbols and words that the computer understands to write our program.

A symbol is a simple picture, like an arrow that shows us what to do.

Computer program needed to get cake

Will this algorithm help the girl get the cake?

Steps needed algorithm
Back to top

Activities

Back to top
Back to top

Play Bitesize Primary games. game

Fun and educational primary games in science, maths, English, history, geography, art and design, computing and modern languages.

Play Bitesize Primary games
Back to top

More on Computer science

Find out more by working through a topic