Flowcharts
A flowchart is a diagram of an algorithm. Each step of the algorithm sits inside a standard symbol, and arrows join the symbols together so the order in which things happen is clear.
The arrows show the flow of control: they tell you which step runs next. Where the arrows lead straight on, one step simply follows another. Where a step asks a question, the arrows split so that one route runs when the answer is yes and a different route runs when the answer is no. A route that turns back and rejoins an earlier part of the chart means those steps are repeated.
Because the arrows set the order in which steps run, a single flowchart can represent sequence, selection and iteration together:
For example, a flowchart for a theme park ride could ask for a rider's height, send tall enough riders down one route and shorter riders down another, then loop back to check the next person in the queue until the queue is empty. One chart holds the decisions and the repetition together.
Drawing the algorithm before you write any code lets you test your thinking with a pencil: missing steps, wrong order and routes that never end are much easier to spot in a diagram than in a program. Fixing them there saves time later.
The symbols are standard, so a flowchart makes sense to anyone who knows the convention, whatever programming language they use.
OCR GCSE Computer Science · Flowcharts