Var3 MS
Var3 MS
com
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 2023 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) 4
Assignment statement Data type
1(b) 4
Expression Evaluates to
STR_TO_NUM(MID(Code, 4, 2)) + 5 28
LENGTH("TRUE" & Code) 11
2(a) 5
2(b) MP1 Simplifies the algorithm // easier to write / understand / test / debug 2
MP2 It is possible to iterate through the values // can use a loop // allows the
storage of many values using a single identifier
3(a) 3
:
MP1 D3, D4, D1, D2 and D5 in question order or reversed - in any five
consecutive locations
MP2 FoQ value matches index with D3
MP3 EoQ value matches index with D5
Mark as follows:
Steps 1 to 4: One mark for gaps filled as shown
Step 5: One mark for 'element' and one mark for other two terms
FOR Count 1 TO 25
ThisNum BaseNum + INT(RAND(StepVal))
OUTPUT ThisNum
BaseNum BaseNum + StepVal
NEXT Count
ENDPROCEDURE
ALTERNATIVE SOLUTION:
5 6
6 6
FUNCTION TestNum(ThisNum : STRING) RETURNS INTEGER
RETURN 0
ENDFUNCTION
MP1 Function heading and ending including parameter and return type
MP2 Test for Condition 1
MP3 Test for Condition 2
MP4 Test for Condition 3
MP5 Return the highest value if more than one condition is satisfied
MP6 Return zero if no condition matched
CLOSEFILE FileName
ENDPROCEDURE
Problem:
• If the file being sent contains a line of the string "****"
• then the file being written by ReceiveFile() will end at this point //
subsequent file lines will be lost
Solution:
• Read the file (at the sending end) to find the number of lines it contains
• Send an initial message which defines the number of lines in the file
ALTERNATIVE SOLUTION:
Finished FALSE
REPEAT
Data GetData()
OUTPUT Data
IF Data = Terminator THEN
Finished TRUE
ENDIF
ENDPROCEDURE
Conditional loop
MP1 Conditional loop
MP2 Test for terminator in both cases
MP3 Use GetData() to get the data from the message
MP4 OUTPUT the data in a loop
MP5 INPUT the data reply
MP6 ‘Attempted ‘ use of Transmit to send it in a loop
MP7 Correct formation of parameters to Transmit()
Limitation:
1 GetData() does not return a value until a message has been received
2 So once a message has been sent the user has to wait for a reply // chat
is half-duplex
Modification:
3 If no response allow the receiver to exit chat at any time …
4 GetData() should immediately return a suitable message // set a time
limit
5 ... which Chat() can detect and respond by allowing the conversation to
continue