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.
Flowchart shapes reference
| Shape | Name | Meaning |
|---|---|---|
| Oval | Terminator | Start or end of the algorithm. |
| Parallelogram | Input / Output | Data going in or a result coming out. |
| Rectangle | Process | A step or action the algorithm carries out. |
| Diamond | Decision | A yes/no question that branches the flow. |
| Arrow | Flow line | Shows 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?
BLC