GCSE · Computer Science · Eduqas · Spec C500QS

Pseudo-code definition of algorithms

Picture giving a friend directions with no map: plain steps, in the right order. Pseudo-code does that for algorithms, and since nobody can press Run, you become the computer.

Computer Science · Pseudo-code

Be the computer: run this pseudo-code by hand

No computer is running this. You are. Step through, and before the table shows a marked step, call it: the value, the branch or the output. Then try the second set of scores.

passes ← 0
FOR i ← 1 TO 3
INPUT score
IF score >= 50 THEN
passes ← passes + 1
OUTPUT "Pass"
ELSE
OUTPUT "Try again"
ENDIF
NEXT i
OUTPUT passes

Variables

passes=0

Step 1. The first statement stores 0 in passes. This first step is worked for you.

Step 1 of 19Called right: 0 of 5

​

Computer Science · Representing algorithms

One algorithm, four ways to write it

  1. 1 Explore
  2. 2 Translate
  3. 3 Spot the mismatch

Model. One tiny algorithm shown in four forms. The flowchart is written out as a table of its boxes instead of being drawn, and the Python is a short version for comparison.

Step 1 · Explore

Tap a part in any form and see where it appears in the others. Then tap a part from each branch.

Linked parts: select one to follow it through every representation

In plain sentences.

Linked parts tried: 0 of 2.

Computer Science · What pseudo-code is

So what actually is pseudo-code?

Four pupils each explain pseudo-code to a new student. Only one of them is right.

Which explanation is closest to what you think?
How sure are you?

Computer Science · Writing pseudo-code

Finish the algorithm

A shop wants an algorithm that asks for the prices of 4 items, adds them up, then outputs "Free delivery" if the total is 50 or more and "Delivery charge applies" if not. Understand it first: what goes in (four prices), what must come out (one message). Then break it down: start a total, repeat four times (get a price, add it on), then decide the message.

  1. total ← 0Step one of the plan: set up the total at 0, once, before anything is added.
  2. missing step
Which line is step 2?

Computer Science · Checking pseudo-code

Find the faulty statement

This pseudo-code should output the total of three marks typed in. When 4, 5 and 6 are typed in, it outputs 6 instead of 15. Which statement breaks it?

A pupil's algorithm — which line goes wrong?

Computer Science · Writing pseudo-code

Write it, then mark it

A bus company charges a child fare to passengers under 16 and an adult fare to everyone else. Write pseudo-code for an algorithm that deals with 5 passengers. For each passenger it asks for their age and outputs "Child fare" or "Adult fare". [6 marks]

0 words · your answer stays on this page and is not sent anywhere.

Exam line: Any clear, consistent pseudo-code style can earn the marks: there is no set standard, so what counts is that the statements are in a sensible order and the meaning is clear.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

A plain-words plan anyone can follow, and the skill of being the computer that runs it.

What you need to know

  • Pseudo-code writes an algorithm in plain language, with syntax that is independent of any particular programming language.
  • It lays out the steps in a logical, sequential order, and each statement is carried out in the order it is written.
  • A computer cannot run pseudo-code as written: it must be translated into a real language such as Python, Java or C# first.
  • Have a goSam types a neat IF ... ELSE ... ENDIF listing into the school computer, presses Run, and is sure it will work. What has Sam forgotten?

    It has to be translated into a real programming language first.

    Pseudo-code follows no particular language's syntax, so a computer cannot execute it as written.

  • It is human-readable, so basic programming knowledge is enough to follow it, and it translates easily into different languages.
  • Programmers often use it to see whether a solution is possible and logical before translating it into the final program.
  • Unlike flowcharts, pseudo-code has no set standards, so whatever style you choose, be consistent and make the meaning clear.
  • Have a goAva writes INPUT score near the top of her listing and Get score further down, meaning the same thing. Which piece of advice has she ignored?

    Be consistent: use the same wording for the same job.

    Pseudo-code has no set standards, so consistency and clear meaning are what keep it readable.

  • Keywords are often capitalised: INPUT asks the user for something, FOR repeats a set number of times, and IF-THEN-ELSE makes a decision.
  • WHILE repeats for as long as its condition is true, and it checks that condition before each pass.
  • Have a goA loop is written WHILE 3 > 5, with an OUTPUT line inside it. How many times does that OUTPUT run?

    Zero times.

    WHILE checks its condition before each pass, and 3 > 5 is false straight away, so the loop body never runs.

  • To write it: understand the problem, break it into smaller steps, then write the statements in the order they happen.
  • To read it: follow the statements in order, apply each IF and each loop, and say what the algorithm outputs for the inputs given.

The big picture

Pseudo-code is a way of writing an algorithm in plain language, step by step, without following any particular programming language. You learn to read it by following each statement, selection and loop in order, and to write it by understanding the problem and breaking it down.

Key points

1Pseudo-code represents an algorithm in plain language that is independent of any particular programming language, and it must be translated before a computer can run it.
2There are no set standards for pseudo-code, so use a consistent style and keep the meaning clear.
3Selection (IF-THEN-ELSE) decides which statements run, and iteration (FOR, WHILE) decides how many times.
4To write an algorithm: understand the problem, break it into smaller steps, then write the statements in the order they are carried out.
5To interpret an algorithm: follow the statements in order, track the values, apply every selection and loop, then state the output.

Worked example

Problem

What does this algorithm output? It reads: n ← 3, then WHILE n > 0, inside it OUTPUT n and n ← n − 1, then ENDWHILE, and finally OUTPUT "Go!".

⚠ Watch out

Treating pseudo-code as real code or as loose notes. A computer cannot run it until it is translated, but it is not casual: statements run in order, and the style must be consistent and clear.

🧠

Memory hook

Pseudo-code is a plan in plain words: read it top to bottom, be the computer, and translate it before anything runs.

✓

Check yourself

Cover the page and explain to a friend, in three sentences: what pseudo-code is, why a computer cannot run it yet, and one thing that must be true of any pseudo-code you write.

Flashcards

(12)
What is pseudo-code?
A way of writing an algorithm in plain language, with syntax that is independent of any particular programming language.
Why can a computer not run pseudo-code as written?
It follows no real language's syntax. It must be translated into a language such as Python, Java or C# first.
Name three ways an algorithm can be represented.
A written description, a flowchart and pseudo-code.
Pseudo-code has no set standards, unlike flowcharts. What should you do about that?
Be consistent in your chosen style and make sure the meaning is clear.
How are keywords usually written in pseudo-code?
They are often capitalised, for example INPUT, FOR and IF.
What does INPUT do?
It is where a user is expected to input something.
What does FOR show?
A count-controlled iteration: a loop that repeats a set number of times.
What does IF-THEN-ELSE show?
A selection decision: one set of statements runs if the condition is true, and the ELSE statements run otherwise.
How does a WHILE loop decide when to stop?
It repeats while its condition is true, checking the condition before each pass, and ends when it is false.
What two things come before writing the statements?
Understand the problem that needs to be solved, then break it into smaller, more manageable steps.
How do you interpret a piece of pseudo-code?
Follow its statements in order, apply each selection and loop, and state what it does and what it outputs for the given inputs.
Why is pseudo-code often written before the final program?
To see whether a solution is possible and logical before translating it.

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 Eduqas GCSE Computer Science topics

See the full Eduqas Computer Science curriculum →

How this lesson was checked. This Eduqas GCSE Computer Science (specification C500QS)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 23 November 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.