GCSE · Computer Science · Edexcel · Spec 1CP2

Flowcharts

Could a friend play your guessing game from a drawing instead of your code? With a flowchart they can. The shapes do half the explaining for you.

Algorithms · Flowcharts

Follow the flow: a guessing game

Press Next and watch the highlight move. Each shape holds one step, and the shape tells you what kind of step it is.

Predict first: the secret number is 7, and the player guesses 4, then 9, then 7. How many times will the flow pass through the diamond?

YesNoStartGenerate secretInput guessguess = secret?Output"Correct!"End

Output

 

Step 1: In we go. The rounded terminal is the one way in. Flow runs down the page unless an arrow says otherwise.

1 / 10

Press Next to move one step at a time, and Back to rewind.

Step 1 of 10: In we go. The rounded terminal is the one way in. Flow runs down the page unless an arrow says otherwise..

Watch out: The No line runs back UP the page. Flow is normally read top to bottom, so a line going the other way needs an arrowhead, or nobody could tell which way to go.

Algorithms · Flowchart symbols

Which shape does each step need?

Pick a step, then pick the symbol that must hold it. Two of these look almost identical. Can you find them?

Still to sort

Terminal (oval) (0)

Marks the start or the end of the flowchart. It can also be drawn as a rectangle with curved ends.

Process (rectangle) (0)

An operation that changes the value, form or location of data.

Where the line is: A process and an input can both end with a value stored in a variable. Ask where the value came from: made by the computer is a process; typed in by the user is an input.

Input / output (parallelogram) (0)

Data coming into the system, or data going out of it.

Where the line is: Input means taking data into the system, like storing what the user types. Generating a value inside the program isn't an input.

Decision (diamond) (0)

A yes/no or true/false test that decides which one of two paths to take.

Subprogram (rectangle with two lines inside) (0)

A process with its own identifier that is defined somewhere else.

Where the line is: It looks like a process rectangle, but the two extra lines say the detail of this step is defined elsewhere, and it may have a flowchart of its own.

7 of 7 still to sort.

Algorithms · Building a flowchart

Turn the words into shapes

Turn this into a flowchart: "Ask the user for their test score out of 50. Double it to get a percentage. If the percentage is at least 50, display Pass. Otherwise, display Try again."

  1. Terminal: StartEvery flowchart begins with a start terminal.
  2. missing step
Which line is step 2?

Algorithms · Loops in flowcharts

How do you draw 'keep asking'?

A friend is drawing a flowchart for: "Keep asking the user for the PIN until they type the correct one."

How should the repeating part be drawn? Pick the idea closest to what you think right now.
How sure are you?

Algorithms · When to use a flowchart

Is a flowchart always worth drawing?

The claim

You should always draw a flowchart before writing code.

Place each piece of evidence to load the balance. Mark the strong ones — they count double.

  1. A flowchart gives visual clarity when the problem is complex.

    Evidence 1: does it support or challenge the claim?
  2. Laying the logic out as symbols makes it easier to understand.

    Evidence 2: does it support or challenge the claim?
  3. You can check the logic and the steps for errors before any code is written.

    Evidence 3: does it support or challenge the claim?
  4. A flowchart documents a process, so it can be followed later.

    Evidence 4: does it support or challenge the claim?
  5. For a simple program, the code itself may be clear enough.

    Evidence 5: does it support or challenge the claim?
  6. Drawing a flowchart that isn't needed adds to development time.

    Evidence 6: does it support or challenge the claim?

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

An algorithm you can see. Every shape tells you what kind of step it holds, and one diamond is all it takes to make a loop.

What you need to know

  • A flowchart is a diagram that shows each step of an algorithm with symbols, and each symbol holds a single step.
  • The symbols are standardised: everyone uses them consistently, so someone else can read your flowchart, and the shape shows the type of step.
  • Terminal (an oval, or a rectangle with curved ends) marks Start and End. A well-designed flowchart has one entry point and one exit point.
  • Process (rectangle) changes the value, form or location of data, like multiplying a score by 10 or storing a randomly generated value.
  • Input/output (parallelogram) is data coming in, like storing what the user types, or going out, like displaying a message.
  • Have a goThree steps from a game: show the score; add 1 to lives; read the name the player types. Which two go in parallelograms?

    Show the score and read the name the player types.

    One sends data out and one brings data in. Adding 1 to lives changes data already inside the program, so it's a process.

  • Decision (diamond) is a yes/no or true/false test that picks one of two paths. Label each path leaving it with its result.
  • Have a goYour mate's diamond says "Is it raining?" and has one arrow coming out, labelled Yes. They say it's finished. What would you add?

    A second path out, labelled No.

    A decision picks one of two paths, so the No answer needs somewhere to go too, and it needs its own label so nobody has to guess.

  • Subprogram (rectangle with two lines inside) is a process with its own identifier, defined elsewhere, like a function. It may have its own flowchart.
  • Flowlines (arrows) show the direction of flow. It's assumed to run top to bottom and left to right; add arrowheads wherever it goes another way.
  • Repetition is a decision whose result sends the flowline back to an earlier step. Those steps repeat until the other path leads out.
  • Have a goA quiz keeps asking the same question until the answer is right. Where does the diamond's 'wrong' path point, and does that line need an arrowhead?

    Back up to the step that asks the question. Yes, it needs an arrowhead.

    Going back makes the steps repeat, and because that line runs up the page, against the assumed direction, only an arrowhead shows which way to go.

  • Use only the symbols the logic needs and keep it simple. Flowcharts help with complex logic and checking before coding, but a simple program may not need one.

The big picture

A flowchart is an algorithm you can see: one step per symbol, and the shape tells you what kind of step it is. The symbols are standardised, so anyone can read yours. Ovals (terminals) start and end it, rectangles are processes, parallelograms are inputs and outputs, diamonds are decisions and a rectangle with two lines inside is a subprogram. Flow runs top to bottom and left to right unless an arrowhead says otherwise. A decision sends the flow down one of two labelled paths, and if one of those paths points back to an earlier step, you've built a loop.

Key points

1One symbol, one step, and the shape tells you what type of step it is.
2Typed in by the user? Input. Made by the computer? Process. Ask where the value came from.
3A diamond has two ways out, and both get a label.
4A loop is just a decision whose labelled path points back to an earlier step. No special symbol.
5A line heading back up the page needs an arrowhead.
6One start, one end, and no symbols the logic doesn't need.

Worked example

Problem

A student draws a flowchart for: "Input a number. If it is over 100, output Big; otherwise output Small." Their flowchart is: an oval Start; a rectangle Input number; a diamond number > 100? with two unlabelled arrows leaving it; a parallelogram Output "Big" and a parallelogram Output "Small", each leading to its own oval End. Find and fix the three problems.

⚠ Watch out

Mixing up input and process. Storing what the user types is an input (parallelogram); storing a number the computer generates, like a random number, is a process (rectangle). Both end up in a variable, which is why it's tempting. So ask where the value came from.

🧠

Memory hook

Ovals open and close. Rectangles do. Parallelograms talk, in and out. Diamonds ask. And a loop? Just a diamond pointing back.

✓

Check yourself

Cover the page. Which symbol: multiply price by 2; display "You win"; is lives 0?; run calculateTotal, defined elsewhere? Then: how does a flowchart repeat steps, and how does the flow get out?

Flashcards

(15)
What is a flowchart?
A diagram that uses symbols to show each step of an algorithm, with one step in each symbol.
Why are flowchart symbols standardised?
So they're used consistently, and a flowchart drawn by one person can be read and understood by someone else.
What does the terminal symbol look like, and what is it for?
An oval (or a rectangle with curved ends). It marks the start and the end of the flowchart.
How many entry and exit points should a well-designed flowchart have?
One entry point and one exit point.
What does a rectangle show?
A process: an operation that changes the value, form or location of data, e.g. multiplying a score by 10.
What does a parallelogram show?
An input (data taken into the system) or an output (data sent out of the system).
Storing a randomly generated number in a variable: which symbol?
A rectangle (process). The computer makes the value; nothing comes in from the user.
What does a diamond show?
A decision: a yes/no or true/false test that decides which one of two paths to take.
What must every path leaving a decision have?
A label showing its result, such as Yes/No or True/False.
What does a rectangle with two lines inside show?
A subprogram: a process with its own identifier, defined elsewhere, which may have its own flowchart.
Which way is flow assumed to run, and when do you need an arrowhead?
Top to bottom and left to right. Arrowheads are needed where the flow goes in a non-standard direction.
How does a flowchart show repetition?
A decision's labelled path sends the flow back to an earlier step, so the steps repeat until the condition leads out along the other path.
Should you add a decision symbol just in case?
No. Use only the symbols needed to show the logic, and keep the flowchart as simple and clear as possible.
Give two benefits of drawing a flowchart.
Any two: visual clarity for complex problems; logic easier to understand; logic can be checked for errors before coding; documents a process.
When might a flowchart not be worth drawing?
For a simple program whose code is clear enough on its own, where the flowchart would only add development time.

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 posted

More Edexcel GCSE Computer Science topics

See the full Edexcel Computer Science curriculum →

How this lesson was checked. This Edexcel GCSE Computer Science (specification 1CP2)lesson 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 28 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.