GCSE · Computer Science · AQA · Spec 8525
Pseudo-code
How many days until eight people know your secret? You don’t need a laptop to find out, just a few exact lines you can follow in your head. That’s pseudo-code.
Algorithms · Pseudo-code
How many days until 8 people know?
One person knows a secret. Each day, everyone who knows tells one new person. Step through the pseudo-code and watch the values change.
Before you step through: what number do you think this will output?
1 people ← 12 days ← 03 WHILE people < 84 people ← people * 25 days ← days + 16 ENDWHILE7 OUTPUT days
Variables
Output
Step 1: people ← 1 means “store 1 in people”. The arrow points to where the value goes. One person knows the secret.
Press Next one line at a time. The highlighted line is the one you’re following; the values underneath are what’s stored right now.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
The algorithm without the language: plain enough for people to read, exact enough to follow step by step.
What you need to know
- An algorithm can be represented in three ways: as pseudo-code, as program code or as a flowchart.
- Pseudo-code uses plain language to set out the steps of an algorithm in a logical order, one after another.
- Pseudo-code can be understood with only basic knowledge of programming.
- Pseudo-code doesn’t follow the syntax or rules of any particular programming language, so a computer can’t run it as it is. It’s a planning tool.
- Because it isn’t tied to one language, pseudo-code can easily be translated into different programming languages.
- In the exam, any pseudo-code you’re given is written in one standard version, and a question that wants an algorithm tells you which form to answer in: pseudo-code, program code or a flowchart.
The big picture
Pseudo-code is a way of writing an algorithm in plain language, setting out its steps in a logical order, one after another. It’s easy to understand with only basic programming knowledge, and it’s exact enough to follow line by line with no computer. It doesn’t follow the syntax or rules of any particular programming language, so a computer can’t run it as it is. It’s a planning tool, and it can easily be translated into different programming languages. It’s one of three ways to represent an algorithm, alongside program code and flowcharts.
Key points
Worked example
Problem
Write pseudo-code that asks the user for a password and keeps asking until they type "letmein". Each wrong attempt should output "Try again". When they get it right, output "Welcome".
⚠ Watch out
Reading people ← people * 2 as a maths equation that can’t be true. The arrow isn’t “equals”. It means: work out the right-hand side using the value stored now, then store the answer in the variable on the left. If people is 4, it becomes 8.
Memory hook
Pseudo-code is a recipe written for people, not machines: anyone who knows the basics can follow it by hand, but to run it you translate it into a real programming language.
Check yourself
Quick check: follow x ← 5, then x ← x + 3, then OUTPUT x. What’s output? (8. x + 3 uses the value stored at that moment, 5, and the answer goes into x.)
Flashcards
(14)What is pseudo-code?
Name three ways an algorithm can be represented.
Can a computer run pseudo-code as it is?
How much programming knowledge do you need to understand pseudo-code?
Why can pseudo-code be translated into different programming languages easily?
What is pseudo-code used for?
In pseudo-code, what does the arrow ← do?
When does a WHILE loop stop repeating?
What does USERINPUT do in pseudo-code?
What does OUTPUT do in pseudo-code?
In IF … THEN … ELSE … ENDIF, when do the ELSE lines run?
How is pseudo-code different from a flowchart?
How is pseudo-code different from everyday English?
In the exam, what version of pseudo-code will any given pseudo-code use?
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 AQA GCSE Computer Science topics
How this lesson was checked. This AQA GCSE Computer Science (specification 8525)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 29 September 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.