Cambridge IGCSE™: Computer Science 0478/22
Cambridge IGCSE™: Computer Science 0478/22
Cambridge IGCSE™: Computer Science 0478/22
com
Cambridge IGCSE™
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 C 1
AND
XOR
NAND
OR
4(b)(i) One mark for correct use of LENGTH operation, one mark for appropriate test 2
Example:
REPEAT
INPUT Product
UNTIL LENGTH(Product) = 6
4(b)(ii) One mark for correct use of SUBSTRING operation, one mark for appropriate test 2
Example:
REPEAT
INPUT Product
UNTIL SUBSTRING(Product, 1, 2) = "PD"
5 One mark for each description, one mark for each example 6
arithmetic – used in calculations (1) A B + C (1)
Boolean – used for operations with true or false values (1) IF B AND C (1)
logical – used in comparisons/conditional statements/selection statements (1) IF B > C (1)
Example:
Total 0
INPUT Value
WHILE Value <> 9999.9
Total Total + Value
INPUT Value
ENDWHILE
OUTPUT Total
Value 0
Total 0
REPEAT
Total Total + Value
INPUT Value
UNTIL Value = 9999.9
OUTPUT Total
Example:
Counter 0
INPUT Value
WHILE Value <> 9999.9
IF Value > 100
THEN
Counter Counter + 1
ENDIF
INPUT Value
ENDWHILE
OUTPUT Counter
7(a) 01//02//06//10 3
04(07) and/or 08
03(12)
01 Max List[1]
02 Min List[1]
03 FOR Counter 2 TO 1000
04 IF List[Counter] > Max
05 THEN
06 Max List[Counter]
07 ENDIF
08 IF List[Counter] < Min
09 THEN
10 Min List[Counter]
11 ENDIF
12 NEXT Counter
13 OUTPUT "Maximum value is ", Max
14 OUTPUT "Minimum value is ", Min
8(a) X= 1 mark 3
(A AND B) // A AND B 1 mark
AND NOT C 1 mark
A B C X
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 0
10(a) ContractNumber 1
ContractNumber text/alphanumeric
Months integer
EndDate date/time
Sport Boolean
10(d) ContractNumber 2
News AND Sport // Sport AND News
Example answer:
SELECT ContractNumber
FROM Contract
WHERE News // News = TRUE AND Sport // Sport = TRUE ;
Requirements (techniques)
R1 Set up game – generate random cell, clear all other cells in array, set player start position and start player moves
counter (iteration, use of arrays and library routines (round and random))
R2 Input and check move – is it valid? (input, output, iteration and selection)
R3 Decide outcome – has move found the X? If so, give appropriate output. If not increment counter and continue. If 10
moves exceeded, give appropriate output (use of arrays, iteration, selection and output).
// during game
WHILE NumberMoves < MaxMove AND NOT Win
MoveError FALSE
OUTPUT "Please enter your move, L – Left, R – Right, U – Up or D - Down"
INPUT UPPER(PlayerMove)
REPEAT
CASE OF PlayerMove
'L' : TempColumn PlayerColumn – 1
'R' : TempColumn PlayerColumn + 1
'U' : TempRow PlayerRow – 1
'D' : TempRow PlayerRow + 1
OTHERWISE MoveError TRUE
ENDCASE
IF NOT Win
THEN
OUTPUT "You Lose"
ENDIF
AO2: Apply knowledge and understanding of the principles and concepts of computer science to a given context, including the
analysis and design of computational or programming problems
No creditable At least one programming Some programming techniques used are The range of programming techniques
response. technique has been used. appropriate to the problem. used is appropriate to the problem.
Any use of selection, iteration, More than one technique seen applied to All criteria stated for the scenario have
counting, totalling, input and the scenario, check the list of techniques been covered by the use of appropriate
output. needed. programming techniques, check the list of
techniques needed.
Some data has been stored but not Some of the data structures chosen are The data structures chosen are
appropriately. appropriate and store some of the data appropriate and store all the data
required. required.
Any use of variables or arrays or
other language dependent data More than one data structure used to The data structures used store all the
structures e.g. Python lists. store data required by the scenario. data required by the scenario.
No creditable Program seen without relevant Program seen with some relevant The program has been fully commented
response comments. comment(s).
Some identifier names used are The majority of identifiers used are Suitable identifiers with names
appropriate. appropriately named. meaningful to their purpose have been
used throughout.
Some of the data structures used Most of the data structures used have
have meaningful names. meaningful names. All of the data structures used have
meaningful names.
The solution is illogical. The solution contains parts that may be The program is in a logical order.
illogical
The solution is inaccurate in many The solution contains parts that are The solution is accurate.
places. inaccurate.
Solution logically performs all the tasks
Solution contains few lines of code Solution contains lines of code with given in the scenario. Ignore minor syntax
with errors that attempt to perform some errors that logically perform tasks errors.
a task given in the scenario given in the scenario. Ignore minor
syntax errors.
The solution attempts at least one The solution attempts to meet most of The solution meets all the requirements
of the requirements. the requirements. given in the question.
Solution contains lines of code that Solution contains lines of code that Solution performs all the tasks given in
attempt at least one task given in attempt most tasks given in the scenario. the scenario.
the scenario.