Cambridge Assessment International Education: Computer Science 9608/22 October/November 2018
Cambridge Assessment International Education: Computer Science 9608/22 October/November 2018
Cambridge Assessment International Education: Computer Science 9608/22 October/November 2018
Published
This mark scheme is published as an aid to teachers and candidates, to indicate the requirements of the
examination. It shows the basis on which Examiners were instructed to award marks. It does not indicate the
details of the discussions that took place at an Examiners’ meeting before marking began, which would have
considered the acceptability of alternative answers.
Mark schemes should be read in conjunction with the question paper and the Principal Examiner Report for
Teachers.
Cambridge International will not enter into discussions about these mark schemes.
Cambridge International is publishing the mark schemes for the October/November 2018 series for most
Cambridge IGCSE™, Cambridge International A and AS Level components and some Cambridge O Level
components.
These general marking principles must be applied by all examiners when marking candidate answers.
They should be applied alongside the specific content of the mark scheme or generic level descriptors
for a question. Each question paper and mark scheme will also comply with these marking principles.
• the specific content of the mark scheme or the generic level descriptors for the question
• the specific skills defined in the mark scheme or in the generic level descriptors for the question
• the standard of response required by a candidate as exemplified by the standardisation scripts.
Marks awarded are always whole marks (not half marks, or other fractions).
• marks are awarded for correct/valid answers, as defined in the mark scheme. However, credit
is given for valid answers which go beyond the scope of the syllabus and mark scheme,
referring to your Team Leader as appropriate
• marks are awarded when candidates clearly demonstrate what they know and can do
• marks are not deducted for errors
• marks are not deducted for omissions
• answers should only be judged on the quality of spelling, punctuation and grammar when these
features are specifically assessed by the question as indicated by the mark scheme. The
meaning, however, should be unambiguous.
Rules must be applied consistently e.g. in situations where candidates have not followed
instructions or in the application of generic level descriptors.
Marks should be awarded using the full range of marks defined in the mark scheme for the question
(however; the use of the full mark range may be limited according to the quality of the candidate
responses seen).
Marks awarded are based solely on the requirements as defined in the mark scheme. Marks should
not be awarded with grade thresholds or grade descriptors in mind.
1(a)(i) 6
Statement Selection Repetition Assignment
(Iteration)
Index ← Index + 5 3
TempValue[Index] ← 3
ReadValue(SensorID)
IF Index < 30 3
OTHERWISE OUTPUT 3
"ERROR"
1(b)(i) 5
Statement Data type
1(b)(ii) 5
Expression Evaluates to
INT(MaxValue * 2) 26
ASC(Revision + 1) ERROR
ENDIF
ELSE
NewPoints ← 0
ENDIF
RETURN NewPoints
ENDFUNCTION
REPEAT
OUTPUT "Enter the amount"
INPUT Amount
IF Amount > 0 AND Amount < 10000
THEN
Valid ← TRUE
ENDIF
UNTIL Valid = TRUE
RETURN Amount
ENDFUNCTION
Note that the pseudocode shown is only an example. The use of an explicit
flag and IF structure are not essential provided the functionality is provided.
Name: Run-time
Description: The program executes an illegal instruction // performs an
illegal operation that is trapped by the OS
2(b)(ii) One specific value from within each of the following ranges: 4
For example:
• to increase the level of detail of the algorithm // break the problem into
smaller steps
• until steps are easier to solve // to be directly translated into lines of
code
4(a)(i) 5
The identifier name of a local variable FileData / FileLine
NextArrayElement ← 1
FileLine ← 1
CALL ScanCompleted()
RETURN FileLine
ENDFUNCTION
4(c)(ii) Reduces program complexity // easier to develop / test / debug // tasks may 1
be re-used // tasks can be allocated to different programmers/teams (with
different skills) // limited scope of local variables
Count ← 0
Continue ← TRUE
IF Count = 20 THEN
OUTPUT "Do you wish to continue?"
INPUT Reply
IF Reply = 'N'
THEN
Continue ← FALSE
ELSE
Count ← 0
ENDIF
ENDIF
StartNumber ← StartNumber + StepNumber
ENDWHILE
CLOSEFILE FileName
ENDPROCEDURE
NextArrayElement = 1
FileLine = 1
End Function
Q4 (b): Pascal
begin
NextArrayElement := 1;
FileLine := 1;
Q4 (b): Python
def scanfile(searchstring):
# filedata : string
# fileline : integer
# newdata : string
nextarrayelement = 1
fileline = 1
Q4 (d): Pascal
var
ResultArray : array [1..100] of string;
Index : integer;
begin
for Index := 1 to 100 do
ResultArray[Index] := 'NO DATA';
end.
#ResultArray[] as STRING
#ResultArray[] as STRING
ResultArray = []
For Index in range(100):
ResultArray.append("NO DATA")
# ResultArray[99] As String