Cambridge International Examinations
Cambridge International General Certificate of Secondary Education
COMPUTER SCIENCE 0478/22
Paper 2 Algorithms, Programming and Logic Feb/March 2023
MARK SCHEME
Maximum Mark : 75
[Turn over
0478/22 Cambridge International IGCSE - Mark Scheme March 2023
PRE-STANDARDISATION
Cambridge Assessment International Education – Generic Marking Principles
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.
GENERIC MARKING PRINCIPLE 1:
Marks must be awarded in line with:
• 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.
GENERIC MARKING PRINCIPLE 2:
Marks awarded are always whole marks (not half marks, or other fractions).
GENERIC MARKING PRINCIPLE 3:
Marks must be awarded positively:
• 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.
GENERIC MARKING PRINCIPLE 4:
Rules must be applied consistently e.g. in situations where candidates have not followed instructions or in the application of generic level descriptors.
GENERIC MARKING PRINCIPLE 5:
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).
GENERIC MARKING PRINCIPLE 6:
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.
2
0478/22 Cambridge International IGCSE - Mark Scheme March 2023
PRE-STANDARDISATION
Question Answer Marks Guidance
1 C 1
2(a) One mark for each correct line 4
Description Pseudocode statement
a statement to count
FOR Count 1 TO 10
a statement to total Value Value + NewValue
WHILE Value > 10 DO
a statement to start a
pre-condition loop
Value Value + 1
a statement to start a
post-condition loop REPEAT
s for true and false.
2(b) One mark for each point: 5
• Initialisation
• appropriate loop controls
• totalling statement inside the loop
• calculation of average outside loop
• output of average outside loop.
Example: Total 0
FOR Count 1 TO 50
Total Total + Number[Count]
3
0478/22 Cambridge International IGCSE - Mark Scheme March 2023
PRE-STANDARDISATION
Question Answer Marks Guidance
NEXT Count
Average Total / 50
OUTPUT "The average is ", Average
Question Answer Marks Guidance
3 One mark for description, one mark for expansion and one mark for example e.g. 3 •
To ensure that the program works as expected and rejects any invalid data that is input.
Normal data (to check the results of a calculation)
4 One mark for each point max three. 3 for discussion at the STM
• variables and constants are used to store single items of data
• the data stored in variables and constants are accessed by identifier • It could be argued that some
variables store more than a
• variables may change during the execution of a program // can answer by example single item of data.
• constants will remain the same during the execution of a program // can answer by • The last word in the second
example bullet point should perhaps
be ‘identifier(s)’.
5 One mark for a hierarchical structure 4 STM was meant by ‘identifiable
One mark for suitable names for the sub systems inputs’ and ‘identifiable outputs’.
One mark for identifiable inputs Some examples might be
One mark for identifiable outputs appreciated by examiners
4
0478/22 Cambridge International IGCSE - Mark Scheme March 2023
PRE-STANDARDISATION
Question Answer Marks Guidance
For example:
Food ordering system
User Input Display options
Choose display Enter Pay bill Pictures List
Order
Question Answer Marks Guidance
6(a) One mark for each error identified and correction 3
• Line 05 OUTPUT should be INPUT
• Line 06 UsefulEnergy should be UsefulEnergyOut
Line 11 UNTIL TotalEnergyIn <> -1 OR UsefulEnergyOut <> -1 should be
UNTIL TotalEnergyIn = -1 OR UsefulEnergyOut = -1
6(b) One mark for checking for >= 92 2
One mark for outputting "A-rated" only if the condition is met
For example
IF Efficiency >= 92 THEN OUTPUT "A-rated" ENDIF
5
0478/22 Cambridge International IGCSE - Mark Scheme March 2023
PRE-STANDARDISATION
Question Answer Marks Guidance
7(a) One mark for each correct gate, with the correct input(s) as shown. 5
7(b) 4
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
4 marks for 8 correct outputs
3 marks for 6/7 correct outputs
2 marks for 4/5 correct outputs
1 mark for 2/3 correct outputs
6
0478/22 Cambridge International IGCSE - Mark Scheme March 2023
PRE-STANDARDISATION
Question Answer Marks Guidance
8(a) 4
NumberSales Total SaleValue Average OUTPUT
0 0
1 5.50 5.50
2 8.90 3.40
3 15.15 6.25
4 19.00 3.85
5 8.00 -11.00
0 1.6 Average sale value 1.6
One mark for each column Total, Average and OUTPUT
One mark for columns NumberSales and SaleValue
8(b) Error – including negative numbers / not differentiation between negative and positive values 3 STM discuss refunds
Correction
One mark for placement and one mark action
7
0478/22 Cambridge International IGCSE - Mark Scheme March 2023
PRE-STANDARDISATION
Question Answer Marks Guidance
For example – after the input box insert a decision box to reject negative numbers
8
0478/22 Cambridge International IGCSE - Mark Scheme March 2023
PRE-STANDARDISATION
Question Answer Marks Guidance
9(a) 20 1
9(b)(i) CatNo 1
9(b)(ii) It is a unique identifier 1
9(c) 2 marks for 4 correct data types 2
1 mark for 2 or 3 correct data types
Field Data type
CatNo Text/Alphanumeric
Title Text/alphanumeric
Fiction Boolean
Price Real
9(d) One mark for each correct row 2 Any errors in order penalise
BK08 The Princesses Story B Penn once and follow through
BK31 Networking for Beginners A Smith
9(e) One mark if two correct or two marks if completely correct 2
Title
BookList
Author = "B Penn"
9
0478/22 Cambridge International IGCSE - Mark Scheme March 2023
PRE-STANDARDISATION
Question Answer Marks Guidance
10(a) One mark for each correct line 3
DECLARE X : INTEGER
DECLARE Y : REAL
DECLARE Z : BOOLEAN
10(b) One mark for using FUNCTION and ENDFUNCTION and RETURNS BOOLEAN 6
One mark for naming the function Same
One mark for defining the two parameters correctly
One mark for comparing the two parameters and using ROUND
One mark for correctly returning TRUE and FALSE
One mark for correct function call
For example definition:
FUNCTION Same(A : INTEGER, B : REAL) RETURNS BOOLEAN
IF A = ROUND(B,0)
THEN
RETURN TRUE
ELSE
RETURN FALSE
ENDIF
ENDFUNCTION
For example call:
Z Same(X,Y)
10(c) A function is defined once and called many times or 1
Define – setting up the function and call is using a function
10
0478/22 Cambridge International IGCSE - Mark Scheme March 2023
PRE-STANDARDISATION
Question Answer Marks
11 Read the whole answer: 15
Check if each requirement listed below has been met. Requirements may be met using a suitable built-in
function from the programming language used (probably Python, [Link] or Java)
On script tick if requirement met, cross if no attempt seen, omission mark and/or comment if partially met (see
marked scripts).
Use the tables for A02 and A03 below to award a mark in a suitable band using a best fit approach
Then add up the total.
Marks are available for:
• AO2 (maximum 9 marks)
• AO3 (maximum 6 marks)
Data Structures required names shown underlined must be used as given in the scenario
Arrays or lists TeamName, TeamPoints,
(TotalPoints, TotalAwayWin, TotalHomeWin, TotalDraw and TotalLost may be seen but no
requirement to store)
Variables LeagueSize, MatchNo
Constants AwayWin, HomeWin, Draw, and Loss could be variables
Requirements (techniques)
R1 calculates total result for all matches played by each team (nested iteration and totalling)
R2 counts the total number of away wins, home wins, draw matches and lost matches for each team (nested iteration
and counting)
R3 outputs for each team name, total result, total number of away wins, home wins, drawn matches and lost matches
(output and selection)
R4 finds and outputs the name of the team with the highest result and the team with the lowest result. (output and
selection)
11
0478/22 Cambridge International IGCSE - Mark Scheme March 2023
PRE-STANDARDISATION
Question Answer Marks
Example 15 mark answer in pseudocode:
// meaningful identifier names and appropriate data structures to store the data required
DECLARE TeamCounter : INTEGER For
DECLARE MatchCounter : INTEGER
information
DECLARE TeamPoints : INTEGER
DECLARE AwayWinNo : INTEGER inline with
DECLARE HomeWinNo : INTEGER instruction on
DECLARE DrawNo : INTEGER the QP
DECLARE LostNo : INTEGER
DECLARE HighestPoints : INTEGER
DECLARE LowestPoints : INTEGER
DECLARE TopTeam : INTEGER
DECLARE BottomTeam : INTEGER
CONSTANT AwayWin = 3
CONSTANT HomeWin = 2
CONSTANT Draw = 1
CONSTANT Lost = 0
FOR TeamCounter 1 to LeagueSize // zero totals for each club’s results
TotalPoints [TeamCounter] 0
NEXT TeamCounter
FOR TeamCounter 1 to LeagueSize
AwayWinNo 0 // zero totals for each club’s result details
HomeWinNo 0
DrawNo 0
LostNo 0
FOR MatchCounter 1 to MatchNo
TotalPoints[TeamCounter] TotalPoints [TeamCounter]+TeamPoints[TeamCounter,MatchCounter]
CASE OF TeamPoints[TeamCounter, MatchCounter]
12
0478/22 Cambridge International IGCSE - Mark Scheme March 2023
PRE-STANDARDISATION
Question Answer Marks
AwayWin : AwayWinNo AwayWinNo + 1
HomeWin : HomeWinNo HomeWinNo + 1
Draw : DrawNo DrawNo + 1
Lost : LostNo LostNo + 1
ENDCASE
NEXT MatchCounter
OUTPUT "Team ", TeamName[TeamCounter] // Output details of a team’s results
OUTPUT "Total points ", TotalResult[TeamCounter]
OUTPUT "Away wins ", AwayWinNo
OUTPUT "Home wins ", HomeWinNo
OUTPUT "Draws ", DrawNo
OUTPUT "Losses ", LossNo
// Check for highest and lowest results
IF TeamCounter = 1
THEN
HighestResult TotalPoints[TeamCounter]
LowestResult TotalPoints[TeamCounter]
ENDIF
IF TotalPoints[TeamCounter] > HighestResult
THEN
HighestResult TotalPoints[TeamCounter]
TopTeam TeamCounter
ENDIF
IF TotalPoints[TeamCounter] < LowestResult
THEN
LowestResult TotalPoints[TeamCounter]
BottomTeam TeamCounter
ENDIF
13
0478/22 Cambridge International IGCSE - Mark Scheme March 2023
PRE-STANDARDISATION
Question Answer Marks
NEXT TeamCounter
OUTPUT "Top Team ", TeamName[TopTeam] // output highest and lowest team results
OUTPUT "Bottom Team ", TeamName[BottomTeam]
14
Marking Instructions in italics
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
0 1-3 4-6 7-9
At least one programming Some programming techniques used are The range of programming techniques
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
been covered by the use of appropriate
counting, totalling, input and the scenario, check list of techniques programming techniques, check list of
No creditable
output. needed. techniques needed.
response.
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
Any use of variables or arrays or required. required.
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.
Page 15
Marking Instructions in italics
AO3: Provide solutions to problems by:
evaluating computer systems making reasoned judgements presenting conclusions
0 1-2 3-4 5-6
Program seen without relevant Program seen with some relevant
The program has been fully commented
comments. comment(s).
Suitable identifiers with names meaningful
Some identifier names used are The majority of identifiers used are
to their purpose have been used
appropriate. appropriately named.
throughout.
Some of the data structures used Most of the data structures used have
All of the data structures used have
have meaningful names. meaningful names.
meaningful names.
The solution contains parts that may be
The solution is illogical. The program is in a logical order.
illogical.
No creditable
response. The solution contains parts that are
The solution is inaccurate in many
inaccurate. The solution is accurate.
places.
Solution contains lines of code with some Solution logically performs all the tasks
Solution contains few lines of code
errors that logically perform tasks given given in the scenario. Ignore minor syntax
with errors that attempt to perform
in the scenario. Ignore minor syntax errors.
a task given in the scenario.
errors.
The solution attempts at least one
The solution meets most of the The solution meets all the requirements
of the requirements.
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
perform most tasks given in the scenario. the scenario.
the scenario.
Page 16