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.
- 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.
擬似言語はCambridgeがアルゴリズムを書くための言語です。実際の プログラミング言語ではありません—コンピュータが実行することはありませんが、試験では実際のものであるかのように採点されるため、 書式が重要です。
すべてのキーワードは大文字で書きます:IF、REPEAT、PROCEDURE、OUTPUT。
DECLARE Count : INTEGER
Count ← 3
IF Count > 0
THEN
OUTPUT "Ready"
ENDIF
IFを書き、ifやIfを絶対に書かないでください。- キーワードを自分の名前に使用することはできません:変数を
FORと呼ぶことはできません。
** 一般的なミス **
- 小文字のキーワード。採点基準では大文字が求められます。
- 独自に造語したキーワード。このプリントにある単語だけがシラバスに含まれます。