Cambridge has its own pseudocode style that is used in exams. You must learn the exact keywords and structures. The key sections are:
INPUT name OUTPUT "Hello, ", name OUTPUT score
score ← 0 name ← "Alice" score ← score + 10
IF score >= 50 THEN
OUTPUT "Pass"
ELSE
OUTPUT "Fail"
ENDIF
CASE OF grade
"A": OUTPUT "Excellent"
"B": OUTPUT "Good"
OTHERWISE: OUTPUT "Revise"
ENDCASE
FOR counter ← 1 TO 10
OUTPUT counter
NEXT counter
WHILE answer <> "quit" DO
INPUT answer
ENDWHILE
REPEAT
INPUT number
UNTIL number > 0
| WHILE...DO | REPEAT...UNTIL | |
|---|---|---|
| Condition checked | Before the loop body runs | After the loop body runs |
| Minimum runs | 0 times (may never run) | At least 1 time |
| Stops when | Condition becomes FALSE | Condition becomes TRUE |
| Operator | Meaning |
|---|---|
← | Assignment |
= | Equals (comparison) |
<> | Not equal to |
< > | Less than / Greater than |
<= >= | Less than or equal / Greater than or equal |
AND OR NOT | Logical operators |
MOD | Modulus (remainder after division) |
DIV | Integer division (whole number result) |
& | String concatenation (joining strings) |
Flowcharts use standard symbols connected by arrows to show the flow of an algorithm. In the Cambridge exam you may be asked to:
| Symbol | Shape | Use |
|---|---|---|
| Terminator | Oval/Rounded rectangle | START and END of the algorithm |
| Process | Rectangle | Calculations, assignments, actions |
| Decision | Diamond (two exits: YES/NO) | Conditions — IF statements, loop conditions |
| Input/Output | Parallelogram (slanted) | INPUT or OUTPUT |
| Flow line | Arrow | Shows direction of execution |
= for assignment — in Cambridge pseudocode this is ALWAYS ←5 questions · 12 marks
| Term | Definition |
|---|
10 minutes · mixed marks