Year 7

Algorithms & Flowcharts

How to think — and write instructions — like a computer.

What is an algorithm?

An algorithm is a precise, step-by-step set of instructions for solving a problem or completing a task. Computers follow algorithms exactly — they don't fill in gaps or guess what you meant.

Example: an algorithm for making toast: 1) Put bread in the toaster. 2) Push the lever down. 3) Wait until it pops up. 4) Take the toast out.

Flowchart: what to eat for lunch

This is the flowchart from Lesson 9. Trace through it by following the arrows and answering each question.

Start Are you hungry? No Yes Do you have canteen money?  No Bring a packed lunch Yes Buy lunch in the canteen End

Flowchart shapes reference

ShapeNameMeaning
OvalTerminatorStart or end of the algorithm.
ParallelogramInput / OutputData going in or a result coming out.
RectangleProcessA step or action the algorithm carries out.
DiamondDecisionA yes/no question that branches the flow.
ArrowFlow lineShows the order steps happen in.

Draw your own

Build your own flowchart online, for free, at diagrams.net.

Practice challenges

Challenge 1

Write an algorithm for getting ready for school in the morning. Be precise — don't skip any step a computer would need.

Challenge 2

Draw a flowchart that decides whether you need an umbrella, using a decision about the weather.

Challenge 3

Your friend's algorithm for crossing the road is missing a step and it's dangerous. What's missing, and why does precision matter here?