Learning Objectives
- Explain the purpose of pseudocode as a design notation.
- Write clear language-independent algorithm steps.
- Represent input, output, assignment, selection and repetition in pseudocode.
- Translate between a simple flowchart and pseudocode.
Key Terms
- Pseudocode
- A structured, language-independent way of describing an algorithm using readable statements.
- Assignment
- Giving a value to a variable, shown in Cambridge pseudocode using the left arrow.
- Condition
- An expression that evaluates as true or false and controls a decision or loop.
- Indentation
- Spacing used to show which statements belong inside a selection or repetition structure.
- Identifier
- A name used for a data item such as Total, Count or Mark.
- Language independent
- Not tied to the exact syntax of a particular programming language.

Purpose Of Pseudocode
Pseudocode communicates the logic of an algorithm without requiring the exact syntax of Python, Java or Visual Basic. It should be precise enough that the algorithm can be traced and later converted into program code.
Because Cambridge provides a pseudocode notation in the syllabus, candidates should use familiar keywords and the assignment arrow. Pseudocode is not ordinary prose; statements should show clear actions, conditions and block structure.
Basic Statements
| Purpose | Example |
|---|---|
| Input | INPUT Mark |
| Output | OUTPUT Average |
| Assignment | Total ← 0 |
| Selection | IF Mark >= 50 THEN … ELSE … ENDIF |
| Count-controlled repetition | FOR Index ← 1 TO 10 … NEXT Index |
| Pre-condition repetition | WHILE Value < 0 DO … ENDWHILE |
| Post-condition repetition | REPEAT … UNTIL Value >= 0 |
Assignment Is Not Equality
The statement Total ← Total + Mark means calculate the expression on the right and store the result in Total. It is an update, not a mathematical equation claiming a number equals itself plus another number.
An equality sign may be used inside a condition to test whether values are equal. Confusing assignment with comparison is a common source of algorithm errors.
Indentation And Block Endings
Statements controlled by an IF or loop should be indented. Matching endings such as ENDIF, ENDWHILE or NEXT help the reader see where the structure finishes.
Consistent indentation is especially important when structures are nested. Although full programming concepts are developed in Volume 8, Topic 7 algorithms must still be clear enough to amend, trace and test.
Choosing Between Design Methods
Pseudocode is compact and effective for detailed algorithms. Flowcharts are visual and make branching or looping paths easy to see. Structure diagrams show decomposition rather than detailed logic.
A developer may use more than one method: a structure diagram for modules, then pseudocode for each module, and a flowchart for a particularly complex decision path.
Quality Of Pseudocode
- Use meaningful identifiers.
- Initialise totals, counters and flags before use.
- Write conditions that match the requirement exactly.
- Indent controlled statements.
- Ensure loops have a correct start, update and exit.
- Output the required result in the correct place.
Worked Examples
Calculate Rectangle Area
Question: Write pseudocode to input length and width and output the area.
- INPUT Length
- INPUT Width
- Area ← Length * Width
- OUTPUT Area
Answer: The statements form a clear sequence from input to processing to output.
Pass Or Fail
Question: Write pseudocode to output Pass for marks at least 50 and Fail otherwise.
- INPUT Mark
- IF Mark >= 50 THEN
- OUTPUT “Pass”
- ELSE
- OUTPUT “Fail”
- ENDIF
Answer: The IF condition creates two exclusive outcomes.
Examination Guidance
- Use the Cambridge assignment arrow rather than an equals sign for assignment.
- Keep pseudocode language independent and do not mix several programming-language syntaxes.
- Indent statements inside selections and loops.
- Use identifiers that describe their data.
- When translating from a flowchart, preserve every branch and loop.
Common Mistakes
- Writing vague English sentences instead of executable logical steps.
- Using = for assignment and then interpreting it as comparison.
- Omitting ENDIF or loop endings.
- Failing to initialise a total or counter.
- Changing the logic while translating between a flowchart and pseudocode.
Knowledge Check
1. What is pseudocode?
2. What does the assignment arrow mean?
3. Why is indentation useful?
4. Is pseudocode tied to Python?
5. Which design method mainly shows decomposition?