GCSE · Computer Science · Edexcel · Spec 1CP2
Pseudocode
It looks like code, reads like English, and no computer on Earth can run it. That's the whole point.
Computer Science · Algorithms
Be the computer: a monthly software bill
A company charges £5 per user each month, plus 20% VAT. Here's that algorithm in pseudocode. Step through it and watch every variable fill in.
Predict first: with 4 users, what will total_cost be when you reach RETURN?
1 license_cost = 52 vat_rate = 0.23 FUNCTION calculate_monthly_bill(number_users)4 license_fee = number_users * license_cost5 vat = license_fee * vat_rate6 total_cost = license_fee + vat7 RETURN total_cost8 ENDFUNCTION9 bill = calculate_monthly_bill(4)10 PRINT(bill)
Variables
Output
Step 1: A constant: £5 per user, per month. A constant is a value that can't be changed once the program is running.
Press Next one line at a time. Before each step, say out loud what you think the new value will be.
Computer Science · Algorithms
What does each line do?
Pick a line, then pick the job it does.
Still to sort
Input (0)
The program waits for the user to type something in.
Output (0)
Information is shown on the screen.
Selection (0)
A decision: one path or another.
Count-controlled iteration (0)
Repeat a set number of times.
Where the line is: FOR fixes how many times the loop runs before it starts. WHILE doesn't: it keeps checking a condition.
Condition-controlled iteration (0)
Repeat as long as a condition is met.
Where the line is: A WHILE loop may run once, many times or not at all. It depends on the condition, not on a count.
Pseudocode keywords are often written in capitals so they stand out. Sort each line by the job it does.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
Code written for people, not computers. Precise enough to follow line by line, loose enough to belong to no language.
What you need to know
- Pseudocode expresses an algorithm independently of any programming language. 'Pseudo' means pretend or fake.
- A computer can't execute pseudocode directly. It must be translated into a real programming language first.
- Pseudocode has no set standard, so styles differ. Be consistent and make your meaning clear.
- Common keywords, often in capitals: INPUT, PRINT, IF … THEN … ELSE, FOR … TO, WHILE.
The big picture
Pseudocode is a way of writing an algorithm in plain, code-like language that isn't tied to any programming language. The word means 'pretend code': it looks like code, but a computer can't run it until it has been translated into a real language such as Python, Java or C#. There's no set standard, so the style can vary, but it must be consistent and clear. Programmers use it to plan, to check a solution is logical, and to spot errors before writing the final program.
Key points
Worked example
Problem
A program keeps asking the user to guess the password until they get it right, then it displays Welcome. The correct password is already stored in a variable called password. Write this algorithm in pseudocode.
⚠ Watch out
Treating pseudocode as if a computer could run it. It may look like real code, but it follows no language's syntax rules, so it has to be translated into a real programming language first.
Memory hook
Pseudo = pretend. Pretend code is like a recipe written for a person: a cook can follow it step by step, but you can't feed it to the oven. To make a computer run it, you have to translate it into a real programming language.
Check yourself
A classmate types their pseudocode into a Python editor and gets an error. Explain what has gone wrong and what they would need to do instead.
Flashcards
(15)What does the 'pseudo' in pseudocode mean?
What is pseudocode?
Can a computer execute pseudocode directly?
Name three ways of representing an algorithm.
Which is the best way to represent an algorithm?
How do the rules of pseudocode compare with a programming language's rules?
Is there one standard style for pseudocode?
How much programming knowledge do you need to read pseudocode?
When might a programmer skip writing pseudocode first?
What does != mean?
In the style used here, what's the difference between = and == ?
What kind of repetition does FOR … TO give you?
What kind of repetition does WHILE give you?
What is a constant?
What does RETURN do at the end of a function?
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 Edexcel GCSE Computer Science topics
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 30 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.