Beginner Guide ยท Computer Science

What is Pseudocode?
A Beginner's Complete Guide

๐Ÿ“… Updated: June 2026 โฑ 8 min read ๐ŸŽ“ IGCSE ยท A-Level ยท IB
Quick Answer: Pseudocode is a human-readable way to write algorithms using structured English and programming keywords (IF, WHILE, FOR, OUTPUT) โ€” without the strict syntax of a real language. It's used in Computer Science exams worldwide to test logical thinking.

What is Pseudocode?

Pseudocode is a method of describing an algorithm in a structured way that is easier to read than a programming language, but more formal and precise than plain English. Think of it as a bridge between your ideas and actual code.

The word "pseudo" means "false" or "not real" โ€” so pseudocode is "false code." It looks like programming, it follows a logical structure like programming, but it doesn't run on a computer directly (unless you use a tool like PseudoStudio!).

Here is the simplest pseudocode program:

Pseudocode Example โ€” Hello World
OUTPUT "Hello, World!"

One line. One instruction. Output a piece of text. Simple โ€” and that's the point.

Why is Pseudocode Used in Exams?

Computer Science exams like Cambridge IGCSE (0478), A-Level (9618), and IB Computer Science use pseudocode for a very important reason: fairness.

Students at different schools learn different programming languages โ€” some learn Python, others learn Java, others use Visual Basic. If exams required you to answer in a specific language, students who didn't learn that language would be at a disadvantage.

Pseudocode removes this unfairness. Everyone writes in the same structured "language" that is about logic, not syntax. The exam tests whether you can think algorithmically โ€” not whether you remember Python's print() function vs Java's System.out.println().

How to Write Pseudocode

Here are the 5 key rules for writing good pseudocode in Cambridge exams:

  1. Use UPPERCASE keywords. Keywords like OUTPUT, INPUT, DECLARE, IF, WHILE, FOR are always capitalised in Cambridge pseudocode.
  2. Use โ† for assignment, not =. The assignment arrow (โ†) assigns a value to a variable. The equals sign = is for comparison only.
  3. Declare all variables first using DECLARE variableName : DataType.
  4. Indent nested blocks. Everything inside a loop or IF statement should be indented by 4 spaces so it's clear what belongs where.
  5. Close your blocks. FOR loops end with NEXT i. WHILE loops end with ENDWHILE. IF blocks end with ENDIF.
Complete Pseudocode Example โ€” Score Checker
// Step 1: Declare variables
DECLARE Score : INTEGER
DECLARE Grade : STRING

// Step 2: Get input
OUTPUT "Enter your exam score:"
INPUT Score

// Step 3: Make a decision
IF Score >= 70
    THEN
        Grade โ† "A"
    ELSE
        Grade โ† "B or below"
ENDIF

// Step 4: Display output
OUTPUT "Your grade is: ", Grade

Pseudocode vs Real Code

Let's compare the same algorithm written in pseudocode vs Python:

Cambridge Pseudocode
DECLARE i : INTEGER
FOR i โ† 1 TO 5
    OUTPUT i * i
NEXT i
Equivalent Python
for i in range(1, 6):
    print(i * i)

The logic is identical. The pseudocode version just makes the structure clearer and removes language-specific details like Python's range() function.

How to Run Pseudocode?

Normally, you can't run pseudocode because computers only understand real programming languages. But PseudoStudio has built a free online pseudocode compiler that executes Cambridge IGCSE and A-Level pseudocode directly.

This means you can write your pseudocode, press Run, and see actual output โ€” catching bugs and logic errors before your exam. It's like having a practice environment specifically built for Computer Science students.

Test Your First Pseudocode Now

Our free compiler supports the full Cambridge 0478 and 9618 pseudocode specification.

โ–ถ Open Free Pseudocode Compiler

Learn More

Now that you know what pseudocode is, dive into our detailed topic guides to master every part of the Cambridge syllabus: