Grade 9 CS FA 1 (cycle 3) portion
Grade 9 CS FA 1 (cycle 3) portion
This question paper consists of short-answer and structured questions set on Topics 1–6 of the subject
content.
All questions are compulsory, and candidates answer on the question paper.
This paper assesses all assessment objectives, AO1, AO2 and AO3, and assesses the full grade range, A* to G.
This question paper consists of short-answer and structured questions set on Topics 7–10 of the subject
content.
All questions are compulsory, and candidates answer on the question paper.
Knowledge of programming language syntax is not examined; in all cases the logic is more important than the
syntax.
This paper assesses all assessment objectives, AO1, AO2 and AO3, and assesses the full grade range, A* to G.
Scenario question
The final question in Paper 2 is a 15-mark unseen scenario question using the methods and concepts listed in
Topics 7-10 of the subject content.
Candidates will be required to write an algorithm using pseudocode or program code for the context provided.
Teachers are advised to familiarise themselves with the updated Paper 2 specimen paper and mark scheme for
first assessment 2023, which provide an example of the scenario question, how it will be marked, and include
an indicative 15-mark response.
Mathematical requirements
Calculators are not permitted in IGCSE Computer Science examinations.
Flowchart symbols
Flow line An arrow represents control passing
between the connected shapes.
NOT
AND
OR
NAND
NOR
XOR (EOR)
Pseudocode
The following information sets out how pseudocode will appear within the examinations of this syllabus. The
numbers and letters that appear at the end of a sub-heading provide a cross reference to the relevant section
of the subject content.
General style
Font style and size
Pseudocode is presented in Courier New. The size of the font will be consistent throughout.
Indentation
Lines are indented by four spaces to indicate that they are contained within a statement in a previous line.
Where it is not possible to fit a statement on one line, any continuation lines are indented by two spaces from
the margin. In cases where line numbering is used, this indentation may be omitted. Every effort will be made to
make sure that code statements are not longer than a line of code, unless this is necessary.
Note that the THEN and ELSE clauses of an IF statement are indented by only two spaces. Cases in CASE
statements are also indented by only two spaces.
Case
Keywords are in upper case, e.g. IF, REPEAT, PROCEDURE.
Identifiers are in mixed case with upper case letters indicating the beginning of new words, e.g.
NumberOfPlayers.
Meta-variables – (symbols in the pseudocode that should be substituted by other symbols) are enclosed in
angled brackets < >.
Example – meta-variables
REPEAT
<Statements>
UNTIL <Condition>
Comments
Comments are preceded by two forward slashes: //. The comment continues until the end of the line. For
multi-line comments, each line is preceded by //.
Normally the comment is on a separate line before, and at the same level of indentation as, the code it refers
to. Occasionally, however, a short comment that refers to a single line may be at the end of the line to which it
refers.
Example – comments
Literals
Literals of the above data types are written as follows:
• Integer written as normal in the denary system, e.g. 5, –3
• Real always written with at least one digit on either side of the decimal point, zeros being
added if necessary, e.g. 4.7, 0.3, –4.0, 0.0
• Char a single character delimited by single quotes, e.g. ꞌxꞌ, ꞌcꞌ, ꞌ@ꞌ
• String delimited by double quotes. A string may contain no characters (i.e. the empty string),
e.g. “This is a string”, “”
• Boolean TRUE, FALSE
Identifiers
Identifiers (the names given to variables, constants, procedures and functions) are in mixed case using Pascal
case, e.g. FirstName. They can only contain letters (A–Z, a–z) and digits (0–9). They must start with a capital
letter and not a digit. Accented letters and other characters, including the underscore, should not be used.
As in programming, it is good practice to use identifier names that describe the variable, procedure or function
to which they refer. Single letters may be used where these are conventional (such as i and j when dealing
with array indices, or X and Y when dealing with coordinates) as these are made clear by the convention.
Identifiers should be considered case insensitive, for example, Countdown and CountDown should not be
used as separate variables.
Constants (8.1.1)
It is good practice to use constants if this makes the pseudocode more readable, and easier to update if the
value of the constant changes.
Constants are declared by stating the identifier and the literal value in the following format:
CONSTANT <identifier> ← <value>
Only literals can be used as the value of a constant. A variable, another constant or an expression must never
be used.
Assignments
The assignment operator is ←
The identifier must refer to a variable (this can be an individual element in a data structure, such as an array or
an abstract data type). The value may be any expression that evaluates to a value of the same data type as the
variable.
Example – assignments
Counter ← 0
Counter ← Counter + 1
TotalToPay ← NumberOfHours * HourlyRate
Arrays
Declaring arrays (8.2.1)
Arrays are fixed-length structures of elements of identical data type, accessible by consecutive index numbers.
It is good practice to explicitly state what the lower bound of the array (i.e. the index of the first element) is
because this defaults to either 0 or 1 in different systems. Generally, a lower bound of 1 will be used.
1D and 2D arrays are declared as follows (where l, l1, l2 are lower bounds and u, u1, u2 are upper bounds):
StudentNames[1] ← "Ali"
NoughtsAndCrosses[2,3] ← ꞌXꞌ
StudentNames[n+1] ← StudentNames[n]
FOR Index ← 1 TO 30
StudentNames[Index] ← ""
NEXT Index
Common operations
Input and output (8.1.3)
Values are input using the INPUT command as follows:
INPUT <identifier>
The identifier should be a variable (that may be an individual element of a data structure, such as an array).
Several values, separated by commas, can be output using the same command.
INPUT Answer
OUTPUT Score
OUTPUT "You have ", Lives, " lives left"
+ addition
– subtraction
* multiplication
/ division
^ raised to the power of
The integer division operators MOD and DIV can also be used.
DIV(<identifier1>, <identifier2>)
Returns the quotient of identifier1 divided by identifier2 with the fractional part discarded.
MOD(<identifier1>, <identifier2>)
Returns the remainder of identifier1 divided by identifier2
DIV(10, 3) returns 3
MOD(10, 3) returns 1
Multiplication and division have higher precedence over addition and subtraction (this is the normal
mathematical convention). However, it is good practice to make the order of operations in complex expressions
explicit by using parentheses.
= equal to
< less than
<= less than or equal to
> greater than
>= greater than or equal to
<> not equal to
In complex expressions, it is advisable to use parentheses to make the order of operations explicit.
In complex expressions, it is advisable to use parentheses to make the order of operations explicit.