Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Preview

Algorithms and flowcharts

This is the first page of the lesson. Read it and have a go at the activities. The rest is in the full lesson.

45 minutes

A recipe is a program for people

You follow steps to make a cup of tea. Boil the water. Put a tea bag in a cup. Pour the water. Wait. Take the bag out.

If you change the order, the tea goes wrong. A list of steps in the right order is an algorithm: a list of clear steps that solves a problem.

Key words

WordWhat it meansExample
AlgorithmA list of clear steps in order that solves a problem.a recipe
FlowchartA picture of an algorithm made of shapes and arrows.start, check age, end
TerminatorThe shape for Start and End.a rounded box
ProcessThe shape for one thing to do.add 1 to the score
Sub-processThe shape for a job that has its own flowchart.check the password
DecisionThe shape for a question with two answers.is it raining?
SequenceSteps one after another, in order.wake up, wash, eat
SelectionChoosing a path by asking a question.if it rains, take an umbrella
IterationRepeating steps.knock until the door opens
LoopAnother name for iteration.repeat until the door opens

The cells students fill in are left blank in this preview.

Is it an algorithm?

Have a go

Is it an algorithm?

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

What makes a good algorithm

It is...This means...Example
ClearEach step has only one meaning."Add 2" not "add a bit"
In orderThe steps are in the right order.Boil the water before you pour it
FiniteIt ends after a fixed number of steps.It does not run for ever
Has inputs and outputsIt takes in data and gives a result.In: age. Out: ticket price
CorrectIt solves the whole problem.It works for a child and an adult

The cells students fill in are left blank in this preview.

Why write an algorithm first?

A computer cannot guess. It does exactly what the steps say. Nothing more.

If you write the algorithm first, you find mistakes before you write code. You can also show the plan to other people.

Arrows and labels

Arrows show the order. Follow them from Start to End.

A decision has two arrows out. Each arrow has a label, such as yes or no. The circle with a letter is a connector. It joins two parts of a chart that are far from each other.

The lesson goes on

8 more parts of this lesson are in the full curriculum, with the tasks, the final check and the labs. A college account gives your students all of it.