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 f or
Teachers.
Cambridge International will not enter into discussions about these mark schemes.
Cambridge International is publishing the mark schemes f or the February/March 2024 series f or 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 alon gside 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 assess ed 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 fu ll 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 thre sholds or
grade descriptors in mind.
Note: No marks are awarded for using brand names of software packages or hardware.
1 B 1
2(a) One mark for each correct line from the test data type the description 4
extreme
a value that is rejected
normal
a value that is the highest or lowest value to be accepted
Example:
INPUT MyNumber
Location 0
FOR Index 1 TO 50
IF Values[Index] = MyNumber
THEN
Location Index
ENDIF
NEXT Index
IF Location = 0
THEN
OUTPUT "Not found"
ELSE
OUTPUT Location
ENDIF
Last 50
Repeat
Swap FALSE
FOR Index 1 TO Last - 1
IF Values[Index] > Values[Index + 1]
THEN
Temp Values[Index]
Values[Index] Values[Index + 1]
Values[Index + 1] Temp
Swap TRUE
ENDIF
NEXT
Last Last - 1
UNTIL NOT Swap or Last = 1
Example:
REPEAT
OUTPUT "Enter cost price "
INPUT Cost
UNTIL Cost >= 0
REPEAT
OUTPUT "Enter selling price "
INPUT Sell
UNTIL Sell >= 0
or
5(b)(ii) One mark for identifying validation check and one mark for accompanying description max four 4
• presence check (1) to check that values have been input (1)
• type check (1) to check for numerical values (1)
6 One mark for identifying a type of iteration, one mark for accompanying description max four 4
• count controlled (1) number of iterations is pre-determined (1)
• pre-condition (1) checks condition at start of loop // loop may not iterate (1)
• post-condition (1) checks condition at end of loop // loop always iterates at least once (1)
7(a) One mark for each correct gate, with the correct input(s) as shown. 4
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 1
1 1 0 0
1 1 1 0
0 0
1 7 7
2 17 10
3 19 2
4 27 8
5 30 3
6 39 9
9(a)(i) StorageID 1
SizeMetres Real/Integer
Position Char/Integer/Text/Alphanumeric
Hoist Boolean/Text/Alphanumeric
StorageID Text/Alphanumeric
11 Check if each requirement listed below has been met. Requirements may be met using a suitable built-in function from the 15
programming language used (Python, VB.NET or Java).
On the script, add seen if the requirement has been met, NE if a partial attempt, or a cross if no attempt .
Use the tables for AO2 and AO3 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)
Requirements (techniques)
R1 allows a student to enter their weekly screen time and calculates the total number of minutes of screen time for each
student in the week (input, iteration and totalling)
R2 counts the number of days with more than 300 minutes screen time each day and calculates the average week’s
screen time for the whole class (selection, counting, iteration, calculating average)
R3 finds the student with the lowest weekly minutes. Outputs for each student: name, total week’s screen time in hours
and minutes, number of days with more than 300 minutes screen time, outputs the average weeks screen time for the
whole class and the name of the student with the lowest number of minutes (finding minimum value, output)
WeekLength 5
LowestMinutes 1000
ClassTotal 0
FOR StudentCounter 1 to ClassSize // loop for each student
Total 0
DaysOver300 0
FOR DayCounter 1 to WeekLength // loop for each day
REPEAT
OUTPUT "Please enter number of minutes for day ", DayCounter
INPUT Minutes
UNTIL Minutes >= 0
ScreenTime[StudentCounter, DayCounter] Minutes
Total Total + Minutes
IF Minutes > 300
THEN
DaysOver300 DaysOver300 + 1
ENDIF
IF Minutes < LowestMinutes
THEN
LowestMinutes Minutes
LowestIndex StudentCounter
ENDIF
NEXT DayCounter
OUTPUT StudentName[StudentCounter]
OUTPUT "Screen time ", DIV(Total, 60), " hours ", MOD(Total, 60), " minutes "
OUTPUT "Days with more than 300 minutes screen time ", DaysOver300
ClassTotal ClassTotal + Total
NEXT StudentCounter
OUTPUT "Average weekly screen time for class ", ClassTotal / ClassSize, " minutes "
OUTPUT "Lowest weekly time ", StudentNames[LowestIndex]
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 output. the scenario, check the list of techniques been covered by the use of appropriate
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
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.
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
Some of the data structures used Most of the data structures used have used throughout.
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 some given in the scenario. Ignore minor syntax
with errors that attempt to perform errors that logically perform tasks given errors.
a task given in the scenario. 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.