1.1 What is Pseudocode?
Pseudocode is a simplified, informal way of describing a computer program or algorithm using a mix of natural language and programming-like structures. It is not a real programming language — you cannot run pseudocode directly on a computer. Instead, it serves as a bridge between human thinking and actual code.
The word "pseudo" means "fake" or "imitation" — so pseudocode literally means "fake code." It looks similar to real programming code but ignores strict syntax rules so you can focus on the logic of your solution rather than the grammar of a specific language.
Key Idea
Pseudocode is about what the program should do, not how a specific programming language spells it.
The Cambridge International Education (CIE) syllabus for IGCSE Computer Science (0478) and AS & A Level (9618) uses a standardised pseudocode format so that students and examiners all share a common language when discussing algorithms.
What is Pseudocode?
1.2 Why Use Pseudocode?
Pseudocode is widely used by programmers, teachers, and examiners because it offers several important advantages over jumping straight into a real programming language:
- 1Language-Independent: The same pseudocode can be translated into Python, Java, Visual Basic, or any other language. You learn the logic once and reuse it everywhere.
- 2Focus on Logic: Without worrying about semicolons, brackets, or indentation rules, you can concentrate on the actual problem-solving steps.
- 3Easy to Read: Anyone — even non-programmers — can follow the steps because pseudocode reads like structured English.
- 4Planning Tool: Programmers write pseudocode first to plan, then translate it into the target language — saving debugging time later.
- 5Examinable: CIE exams use pseudocode in algorithm questions, so mastering it is essential for top grades in 0478 and 9618.
Why Use Pseudocode?
1.3 Pseudocode vs Programming Languages
It is important to understand where pseudocode sits compared to real programming languages. The table below highlights the main differences:
| Feature | Pseudocode | Programming Language |
|---|---|---|
| Runs on a computer? | No | Yes |
| Strict syntax rules? | No (flexible) | Yes (must be exact) |
| Language-specific? | No (universal) | Yes (Python, Java, etc.) |
| Used for planning? | Yes | Rarely |
| Used in CIE exams? | Yes (0478 & 9618) | No |
| Translated to code? | Yes (manually) | N/A — it is code |
Notice how the same algorithm can be expressed in multiple ways. Here is a simple "greet the user" algorithm shown in pseudocode and then in two real languages:
OUTPUT "What is your name?"
INPUT UserName
OUTPUT "Hello, ", UserNameThe pseudocode version is short, clear, and could be translated into Python (input()), Java (Scanner.nextLine()), or any other language without changing the underlying logic.
Pseudocode vs Programming Languages
1.4 CIE Pseudocode Standards
Cambridge International Education defines a specific set of pseudocode conventions used in IGCSE (0478) and AS & A Level (9618) exams. Following these conventions exactly is important because examiners expect answers in this format.
Keywords (UPPERCASE)
All keywords are written in UPPERCASE: DECLARE, CONSTANT, IF, THEN, ELSE, ENDIF, WHILE, DO, ENDWHILE, FOR, TO, NEXT, OUTPUT, INPUT, RETURN.
Assignment Operator
Use the arrow <- for assignment — never =. Example:Counter <- 0 means "store 0 in Counter".
Variable Declaration
Variables are declared with type:DECLARE <name> : <type>. Types include INTEGER, REAL, STRING, BOOLEAN, CHAR, ARRAY.
Indentation
Code inside loops, IF statements, and subroutines MUST be indented. This shows structure and is essential for marks in CIE exams.
A complete CIE pseudocode reference is published in the syllabus documents — make sure you keep a printed copy handy while practising algorithm questions.
CIE Pseudocode Standards
1.5 Writing Your First Pseudocode
Let's put theory into practice. Here is a complete CIE pseudocode program that asks the user for their name and age, then prints a personalised greeting:
DECLARE Name : STRING
DECLARE Age : INTEGER
OUTPUT "What is your name?"
INPUT Name
OUTPUT "How old are you?"
INPUT Age
OUTPUT "Hello, ", Name
OUTPUT "Next year you will be ", Age + 1, " years old."Line-by-line walkthrough:
- Lines 1-2: Two variables are declared with their data types.
Nameholds text,Ageholds whole numbers. - Lines 4-5:
OUTPUTdisplays a prompt on screen;INPUTreads the user's response and stores it inName. - Lines 7-8: Same pattern — ask for and store the age.
- Lines 10-11:
OUTPUTcombines fixed text with the variable values. Note the comma,separates each item to print, and the expressionAge + 1is calculated automatically.
Tip
Always declare variables at the top of your program, use meaningful names, and indent any code inside loops or conditions. These habits will earn you method marks even if your logic has a small mistake.
Writing Your First Pseudocode
1.6 Key Points Summary
Here is a quick recap of everything we've covered:
- Pseudocode is "fake code" — It is a human-readable description of an algorithm, not a runnable language.
- Language-independent — The same pseudocode can be translated into any programming language.
- CIE standards apply — Use UPPERCASE keywords, <- for assignment, and DECLARE for variables.
- Indentation matters — Code inside IF/WHILE/FOR blocks must be indented for clarity and exam marks.
- Output & Input — OUTPUT displays information; INPUT reads values from the user.
- Plan first, code second — Write pseudocode before coding to design your solution clearly.