Computer Science • Pseudocode

IGCSE Pseudocode

IGCSE Pseudocode — Explanation

Write pseudocode the way the Cambridge IGCSE Computer Science (0478) exam expects it, then run it. Your code is checked strictly against the pseudocode section of the 0478 syllabus:

Errors are listed under your code, and the program won't run until they're fixed. Style notes are how the IGCSE writes things (such as THEN on its own line): your program still runs, but it's worth matching the exam's style.

Run runs your program in the run window: OUTPUT appears there, and INPUT asks you for a value. Step runs one statement at a time, highlighting it. The trace table fills in as it runs, a new row whenever a variable changes again, as in the exam's trace tables.

Check answer runs your program on the question's tests, including some you can't see, so it has to work for any input, not just the example. Messages you show before an INPUT (prompts) aren't marked, and capitals, spaces and punctuation in the output don't matter. If it's not right, you're told which test it failed and what that suggests, never the answer. Stuck? Hint halves the question's marks; Show me shows a program that works, and the question scores nothing. Playground, in the title bar, is a free editor to try anything.

Signed in, your code is saved as you go. Topics your teacher has set come up first.

Objective: Cambridge IGCSE Computer Science 0478 (2026–2028), section 8 Programming and section 7 Algorithm design: write and test algorithms in pseudocode using variables, constants, data types, input and output, sequence, selection, iteration, totalling, counting, string handling, arithmetic, logical and Boolean operators, nested statements, procedures, functions, library routines, arrays and files.

Where this fits

  • Cambridge: Cambridge IGCSE Computer Science (0478)

IGCSE Pseudocode — Key Terms

Key concepts in English, with te reo Māori, Chinese (Simplified) and Korean.

EnglishTe reo Māori中文(简体)한국어What it means on this page
Constantno attested term——A named value that is set when it's declared and can't be changed while the program runs, such as CONSTANT Rate = 0.15.
Declarationno attested term——A statement that names a variable and gives its data type before it's used, such as DECLARE Total : INTEGER.
Assignmentno attested term——Giving a variable a value. Pseudocode writes it with an arrow: Total ← 0.
STRINGno attested term——A data type for a sequence of zero or more characters, written in double quotes, such as "Kia ora".
CHARno attested term——A data type for exactly one character, written in single quotes, such as 'A'.
Parameterno attested term——A value passed to a procedure or function when it's called, named in its header, such as Size in PROCEDURE Line(Size : INTEGER).
Library Routineno attested term——A ready-made procedure or function that comes with a language, such as LENGTH, ROUND or RANDOM.
Countingno attested term——Adding 1 to a variable each time something happens, to find how many times it happened: Count ← Count + 1.
Totallingno attested term——Adding each value to a running total, which starts at 0, to find their sum: Total ← Total + Value.
Linear Searchno attested term——Checking each item of a list in turn, from the start, until the item being searched for is found or the end is reached.
Text Fileno attested term——A file of lines of text, read or written a line at a time, which keeps its data after the program ends.
Pseudocodeno attested term伪代码의사코드A structured, language-independent way of writing an algorithm, using keywords like IF, FOR and WHILE.
Algorithmhātepe算法알고리즘A precise sequence of steps for solving a problem — what both the pseudocode and the flowchart on this page describe.
Variabletāupe变量변수A named location that holds a value which can change while the algorithm runs — the columns of the trace table.
Data typemomo raraunga数据类型자료형What kind of value a variable can hold — for example INTEGER, REAL, STRING or BOOLEAN.
INTEGERno attested term整数정수An SQL data type for whole numbers, such as a count or a mark.
REALno attested term实数실수An SQL data type for numbers with a decimal part, such as a height or a price.
BooleanPūreana布尔불Having only two possible values: 1 (true) or 0 (false).
Sequenceraupapa顺序结构순차 구조Steps carried out one after another, in the order they are written or drawn.
Selectionno attested term选择结构선택 구조A decision point where the algorithm follows one of two or more branches — IF or CASE, or a decision box in a flowchart.
Iteration (loop)koromeke循环(迭代)반복(루프)A block of steps that repeats — FOR, WHILE or REPEAT — while or until a condition holds.
Nested IFno attested term嵌套 IF (qiàntào IF)중첩 IF (jungcheop IF)An IF function inside another IF, used to choose between more than two results, such as grades A, B, C or U.
Arrayhuānga数组배열An ordered list of values, all referred to by one name and an index, e.g. Numbers[3].
Functiontaumahi函数함수A named block of instructions that returns a value back to where it was called.
Procedurearamahi过程프로시저A named block of instructions that is run (CALLed) but does not return a value.
Trace tableno attested term追踪表추적표A table used to record the value of each variable, row by row, as an algorithm is dry-run by hand.
Validationno attested term数据验证 (shùjù yànzhèng)유효성 검사 (yuhyoseong geomsa)An automatic check by the computer, as data is entered, that the data is reasonable and follows set rules; it cannot tell whether the data is correct.

On the te reo Māori column. Terms marked as gaps have no attested equivalent in the sources checked — Karaitiana Taiuru's Dictionary of Māori Computer and Social Media Terms, Paekupu, the Reserve Bank's te reo financial glossary, NZQA and Te Aka. No coinage is printed as though it were established; where a class needs one, commission it from Te Taura Whiri i te Reo Māori and credit the translator. Te reo Māori is not italicised and takes no plural "s".