Cambridge International AS & A Level: Computer Science 9608/43 October/November 2021
Cambridge International AS & A Level: Computer Science 9608/43 October/November 2021
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 2021 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.
[7]
[6]
[5]
[4]
[3] (8)
[2] 50
[1] 20
[0] 10
Example code:
VB.NET
Function Pop()
Dim Value as Integer
If TopPointer < 0 Then
Return -1
Else
Value = DataStack(TopPointer)
TopPointer = TopPointer – 1
Return Value
End if
End Function
Python
def Pop():
if TopPointer < 0 :
return -1
else:
Value = DataStack(TopPointer)
TopPointer= TopPointer – 1
return Value
1(b) Pascal
Function Pop(): integer;
var
Value : integer;
begin
if TopPointer < 0 then
Pop := -1
else
Value := DataStack(TopPointer);
TopPointer := TopPointer – 1;
Pop := Value
end;
GradeGenerator
ELSE
RETURN Mid
ENDIF
ENDIF
ENDIF
ENDWHILE
ENDFUNCTION
4(c) 1 mark 1
busy(X, monday, 3)
Example pseudocode:
TYPE CustomerData
DECLARE CustomerID : INTEGER
DECLARE FirstName : STRING
DECLARE SecondName : STRING
ENDTYPE
6(c) 1 mark for naming a feature, 1 for description. Max 2 for each feature 4
Example:
• Breakpoint
• Stop the program at a set point and check the variables
• Stepping/step-through etc.
• Execute the program one line at a time to check the values
Drawback
Example:
• May not perform the tasks exactly as required
• Solution is likely to be inefficient
• Might produce errors
• The programmer may not understand the solution and hence cannot edit/change
VB.NET
Try
Dim Value As Integer
Console.WriteLine("Enter a number")
Value = Console.ReadLine()
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
Python
try:
Value = int(input("Enter a number"))
except:
print("Invalid number")
Pascal:
begin
try
readln(Value);
except
On E : Exception do writeln("Invalid number");
end;
RootNode 0 [0] 3 50 1
[1] 6 67 2
[2] –1 77 –1
[3] 4 35 5
[4] –1 2 –1
[5] –1 43 –1
[6] –1 52 –1
[7] –1 –1
[8] –1 –1
[9] –1 –1
[10] –1 –1
Example pseudocode
9(b) • Function declaration (and end where appropriate) taking data as (integer) parameter (returns Boolean)
• Calculate hash: parameter mod 1000 + 6
Python
def AddItem(DataToAdd):
Location = (DataToAdd % 1000) + 6
if StoredData[Location] <> -1:
Found = False
Counter = 0
if Found == True:
StoredData[Location] = DataToAdd
return True
else:
return False
else:
StoredData[Location] = DataToAdd
return True
9(b) Pascal
function AddItem(DataToAdd:Integer):Boolean;
begin
Location := (DataToAdd mod 1000) + 6;
if StoredData[Location] <> -1 then
begin
Found := false;
Counter := 0;