KS3 · Computer Science
Flowcharts for algorithms
A flowchart adds 5 to a number while it's under 20. Start it at 8. Does it output 20? Most people think so. Follow the arrows and find out.
Computer Science · Flowcharts
Saving up: follow the flow
Money starts at 8, and 5 gets added while it's under 20. Guess the output first. Then step through and watch which symbol lights up.
Predict before you step: what does this flowchart output?
Output
Step 1: Off we go. The arrows decide what happens next, not where the boxes sit.
Press Next one step at a time. Before each step, say out loud where the arrow goes.
Computer Science · Flowcharts
Which shape does it go in?
Pick a step, then pick the symbol that should hold it.
Still to sort
Terminator (oval or rounded rectangle) (0)
Marks the start or the end of the algorithm.
Process (rectangle) (0)
An instruction or a calculation.
Where the line is: If data is coming in from outside or a result is going out, it's input/output, not a process.
Input/output (parallelogram) (0)
Data coming in, or results going out.
Decision (diamond) (0)
A yes/no question with two exits.
Where the line is: The algorithm answers this question itself, Yes or No, to choose a path. Asking the user to type something is input, not a decision.
The shape tells you what kind of step it is before you've even read the words. Sort each step into its symbol.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
A flowchart is an algorithm you can follow with your finger. The arrows set the order, a diamond picks the path, and an arrow pointing back makes steps repeat until a decision lets the flow out.
What you need to know
- An algorithm is a precise, ordered set of steps for solving a problem. You can plan it before it's programmed, as a flowchart or written steps.
- A flowchart draws an algorithm as standard shapes joined by arrows. The arrows set the order, not where the boxes sit.
- Start and End go in a terminator: an oval or a rounded rectangle.
- A rectangle is a process: an instruction or calculation. A parallelogram is input or output: data coming in, results going out.
Have a goYour mate Kai puts OUTPUT total in a rectangle. "It's an instruction, so it's a process. Obviously." Is Kai right? Which shape should it be?
Not quite: it belongs in a parallelogram.
Showing a result is output, and output goes in a parallelogram. A rectangle is only for processes such as instructions and calculations.
- Selection: a diamond holds a yes/no question with two exits, and the answer picks the one path the flow takes.
Have a goA diamond asks "Is it raining?" and the answer is No. How many of the diamond's two exits does the flow go down?
Just one: the No exit.
A decision picks one path. The steps on the Yes path are skipped this time; the flow never goes down both.
- Sequence: on a path with no decision and no arrow back, each step is carried out once, in arrow order.
- Iteration: an arrow back to an earlier step repeats a group of steps, and a decision controls when the repeating stops.
Have a gon starts at 0. A diamond asks "n < 3?". Yes: n = n + 1, then an arrow back to the diamond. No: End. How many times does n = n + 1 run?
3 times (n becomes 1, then 2, then 3).
The question is asked 4 times, at 0, 1, 2 and 3. At 3, 3 < 3 is false, so the flow leaves. Counting the asks instead of the adds gives 4.
- Drawing one? One Start, at least one End, each step in its proper symbol, both decision exits labelled, and arrows joining every step.
- Trace it: follow the arrows from Start with a real input, noting values as they change. That finds the output, and the errors.
- Comparing two flowcharts for one job? First check each works for every input you need, boundary cases included. Then compare steps.
The big picture
A flowchart draws an algorithm as standard shapes joined by arrows, and the arrows set the order. Terminators hold Start and End, rectangles hold processes, parallelograms hold input and output, and diamonds hold decisions with two exits. Steps run in sequence, branch at a decision (selection), or repeat when an arrow leads back, with a decision controlling when the repeating stops (iteration). Trace with real inputs to find the output and catch errors, and compare two flowcharts by checking they work for the inputs that matter before counting steps.
Key points
Worked example
Problem
Trace this flowchart with an input of 4 and write down everything it outputs. Start → INPUT n → count = 1 → decision "count ≤ 3?". Yes: OUTPUT n × count, then count = count + 1, then an arrow back up to the decision. No: End.
⚠ Watch out
Thinking a loop stops by itself, or stops when the value gets close to the number in the decision. It stops only when the flow reaches the decision and the answer sends it out. An arrow back with no decision and no other exit repeats for ever.
Memory hook
Ovals open and close, rectangles do, parallelograms pass data in and out, and diamonds decide. A loop goes round until its diamond lets it out.
Check yourself
Sketch the four symbols and say what each one holds. In a loop, what decides when the repeating stops? How would you decide which of two flowcharts for the same job is better?
Flashcards
(14)What is an algorithm?
What is a flowchart?
In a flowchart, what do the arrows show?
Which symbol marks Start and End, and what shape is it?
What goes in a rectangle (process box)?
What does a parallelogram show?
What does a diamond hold, and how many exits does it have?
What is sequence in a flowchart?
What is selection in a flowchart?
How does iteration (repetition) appear in a flowchart?
In a flowchart loop, what controls when the repeating stops?
What happens if an arrow loops back with no decision and no other exit?
What does it mean to trace a flowchart?
Why can't one successful test prove a flowchart is correct?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore KS3 Computer Science topics
How this lesson was checked. This KS3 Computer Sciencelesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 27 October 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.