Cambridge International AS & A Level: Computer Science 9618/21
Cambridge International AS & A Level: Computer Science 9618/21
Cambridge International AS & A Level: Computer Science 9618/21
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 May/June 2024 series for most
Cambridge IGCSE, Cambridge International A and AS Level and Cambridge Pre-U 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
descriptions 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.
Note: No marks are awarded for using brand names of software packages or hardware.
1(a) 4
Assignment statement Data type
C INT(ItemCost) / 3 REAL
1(b) 4
Expression Evaluates to
Tries MOD 4 1
1(c)(i) The names do not reflect / indicate the purpose of the variable // the names 1
are not meaningful
1(c)(ii) They make the program more difficult to understand / debug / maintain 1
2(a) 5
The values stored in the two variables will indicate the first
element in each list
The first 1D array will be used to store the values // data items
// User IDs
Mark as follows:
4 Example: 6
Odd 0
Even 0
ENDFUNCTION
Mark as follows:
1. Function heading, ending and return type
2. Declare local variables Odd, Even and Index as integers
3. Initialise Odd and Even
4. Loop for 100 iterations // through array
5. Sum Odd and Even element values in a loop
6. Compare Odd and Even after the loop and Return appropriate string
5(a) 6
5(b)(ii) After the 'Z' clause in the CASE construct // before the ENDCASE 1
ENDFUNCTION
Mark as follows:
Problem:
The function will return an incorrect value // the test will fail
Solution:
Round the calculated values (to a known number of decimal places)
Define a threshold below which any difference can be ignored
Item: name
Justification: to personalise the text message
Max 2 marks
7(b)(i) 2
Means that Update calls (one of) either Sub-A, Sub-B or Sub-C
NewLine Line
TrimTo 0
Count 1
WHILE Count < LENGTH(Line) AND TrimTo = 0
TwoChars MID(Line, Count, 2) // extract 2 chars
IF TwoChars = Comment THEN
TrimTo Count
ENDIF
Count Count + 1
ENDWHILE
RETURN NewLine
ENDFUNCTION
Mark as follows:
8(b) Example: 7
CLOSEFILE OldFile
CLOSEFILE NewFile
RETURN Count
ENDFUNCTION
Mark as follows: