Pseudocode 伪代码 is the language Cambridge writes algorithms 算法 in. It is not a real programming language — no computer runs it — but the exam marks it as if it were, so the form matters.
Every keyword 关键字 is written in upper case: IF, REPEAT, PROCEDURE, OUTPUT.
DECLARE Count : INTEGER
Count ← 3
IF Count > 0
THEN
OUTPUT "Ready"
ENDIF
- Write
IF, neveriforIf. - A keyword can never be used as a name of your own: you may not call a variable
FOR.
Common mistakes
- Lower-case keywords. The mark scheme expects upper case.
- Inventing keywords. Only the words in this handout are in the syllabus.