What is an algorithm?

Open navigator

1. Code needs algorithms

You use code to tell a computer what to do. Before you write code you need an algorithm.

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

Algorithms need to have their steps 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.

2. Algorithms - the basics

Watch this video and find out what algorithms are.

3. How do you use algorithms?

People use lots of algorithms every day even if they don’t realise it. Choose from three problems and guess what the algorithm might be!

We need to make a cake

You selected

We need to make a cake

The algorithm here is a cake recipe. You can find the algorithm to solve this problem in a cookbook!

We can’t find the park

You selected

We can’t find the park

The algorithm you need is a set of directions to get to the park! There might be different ways to the park so you can have different algorithms.

We need to build a toy

You selected

We need to build a toy

The algorithm to follow here is the list of instructions that tell you how to make the toy.