0% found this document useful (0 votes)
18 views383 pages

IGCSE Computer Science Mark Scheme 2025

The document is the mark scheme for the Cambridge IGCSE Computer Science Paper 2 for February/March 2025, detailing the marking principles and guidelines for examiners. It includes generic marking principles, annotations used by examiners, and specific marking points for various questions. The document aims to assist teachers and candidates in understanding how marks are awarded based on the examiners' instructions.

Uploaded by

Naisha Vohra
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views383 pages

IGCSE Computer Science Mark Scheme 2025

The document is the mark scheme for the Cambridge IGCSE Computer Science Paper 2 for February/March 2025, detailing the marking principles and guidelines for examiners. It includes generic marking principles, annotations used by examiners, and specific marking points for various questions. The document aims to assist teachers and candidates in understanding how marks are awarded based on the examiners' instructions.

Uploaded by

Naisha Vohra
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Cambridge IGCSE™

COMPUTER SCIENCE 0478/22


Paper 2 Algorithms, Programming and Logic February/March 2025
MARK SCHEME
Maximum Mark: 75

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 2025 series f or most
Cambridge IGCSE, Cambridge International A and AS Level components, and some Cambridge O Level
components.

This document consists of 21 printed pages.

© Cambridge University Press & Assessment 2025 [Turn over


0478/22 Cambridge IGCSE – Mark Scheme February/March 2025
PUBLISHED
Generic Marking Principles

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.

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 assess ed 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.

© Cambridge University Press & Assessment 2025 Page 2 of 21


0478/22 Cambridge IGCSE – Mark Scheme February/March 2025
PUBLISHED
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 fu ll 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.

© Cambridge University Press & Assessment 2025 Page 3 of 21


0478/22 Cambridge IGCSE – Mark Scheme February/March 2025
PUBLISHED
Annotations guidance for centres

Examiners use a system of annotations as a shorthand for communicating their marking decisions to one another. Examiners are trained during the
standardisation process on how and when to use annotations. The purpose of annotations is to inform the standard isation and monitoring
processes and guide the supervising examiners when they are checking the work of examiners within their team. The meaning of annotations and
how they are used is specific to each component and is understood by all examiners who mark the component.

We publish annotations in our mark schemes to help centres understand the annotations they may see on copies of scripts. Note that there may
not be a direct correlation between the number of annotations on a script and the mark awarded. Similarly, the use of an annotation may not be an
indication of the quality of the response.

The annotations listed below were available to examiners marking this component in this series.

Annotations

Annotation Meaning

Correct point

Incorrect point

Follow through

Repetition

Ignore

Benefit of doubt given

Content of response too vague

Not answered question

Omission

Section not relevant

© Cambridge University Press & Assessment 2025 Page 4 of 21


0478/22 Cambridge IGCSE – Mark Scheme February/March 2025
PUBLISHED
Annotation Meaning

Section incorrect

Highlighter Highlights part of the answer or shows structure of complex answers

Page or response seen by examiner

AO2 mark

AO3 mark

Not enough

Required item one

Required item two

Required item three

Correct awarding one mark

Correct awarding two marks

Correct awarding three marks

Correct awarding four marks

Correct awarding five marks

Correct awarding six marks

Correct awarding seven marks

Correct awarding eight marks

Correct awarding nine marks

© Cambridge University Press & Assessment 2025 Page 5 of 21


0478/22 Cambridge IGCSE – Mark Scheme February/March 2025
PUBLISHED
Mark scheme abbreviations

/ separates alternative words / phrases within a marking point


// separates alternative answers within a marking point
underline actual word given must be used by candidate (grammatical variants accepted)
max indicates the maximum number of marks that can be awarded
( ) the word / phrase in brackets is not required, but sets the context

Note: No marks are awarded for using brand names of software packages or hardware.

Question Answer Marks

1 C 1

Question Answer Marks

2 B 1

© Cambridge University Press & Assessment 2025 Page 6 of 21


0478/22 Cambridge IGCSE – Mark Scheme February/March 2025
PUBLISHED
Question Answer Marks

3 One mark for each correct line 4

Stage Description

identifying of the problem and requirements


testing

reviewing the final solution to suggest further


analysis developments

making sure the program code works as


expected
coding

using structure diagrams, flowcharts and


pseudocode to plan the solution
design
using a programming language to create the
solution

Question Answer Marks

4(a) To check that a value has been entered. 1

4(b)(i) Type (check) 1

© Cambridge University Press & Assessment 2025 Page 7 of 21


0478/22 Cambridge IGCSE – Mark Scheme February/March 2025
PUBLISHED
Question Answer Marks

4(b)(ii) One mark per mark point: 5


MP1 Condition controlled loop used
MP2 Working input and re-input of value into declared variable
MP3 Use of selection/loop entry/exit condition to test if input is an integer
MP4 Appropriate use of error message
MP5 Working complete termination of loop

Example:
REPEAT
INPUT Number
IF MOD(Number, 1) <> 0
THEN

OUTPUT "Please try again"


ENDIF
UNTIL MOD(Number, 1) = 0

Or

INPUT Number
WHILE MOD(Number, 1) <> 0 (DO)
OUTPUT "Please try again"
INPUT Number
ENDWHILE

© Cambridge University Press & Assessment 2025 Page 8 of 21


0478/22 Cambridge IGCSE – Mark Scheme February/March 2025
PUBLISHED
Question Answer Marks

5 One mark for each correct box 6

Test data Type of test data Purpose of test data

ABC Abnormal to make sure that the program rejects


data that is too short

Password1 // Boundary to make sure that the program rejects


Password22 data that is only just too short //

to make sure that the program accepts


data that is only just at the correct length

CambridgeInternational Normal to make sure that the program accepts


data that is an appropriate length

© Cambridge University Press & Assessment 2025 Page 9 of 21


0478/22 Cambridge IGCSE – Mark Scheme February/March 2025
PUBLISHED
Question Answer Marks

6(a) One mark per mark point 5

• Line 02 / DECLARE Highest : STRING


should be DECLARE Highest : INTEGER

• Line 05 / Highest  1500


should be Highest  0

• Line 09 / Total  Total + Count


should be Total  Total + Numbers[Count]

• Line 10 / IF Numbers[Count] > Total


should be IF Numbers[Count] > Highest

• Line 17 / OUTPUT "The average is ", Average / 1000


should be OUTPUT "The average is ", Total / 1000

© Cambridge University Press & Assessment 2025 Page 10 of 21


0478/22 Cambridge IGCSE – Mark Scheme February/March 2025
PUBLISHED
Question Answer Marks

6(a) Corrected algorithm


01 DECLARE Numbers : ARRAY[1:1000] OF INTEGER
02 DECLARE Highest : INTEGER
03 DECLARE Count : INTEGER
04 DECLARE Total : INTEGER
05 Highest  0
06 Total  0
07 FOR Count  1 TO 1000
08 INPUT Numbers[Count]
09 Total  Total + Numbers[Count]
10 IF Numbers[Count] > Highest
11 THEN
12 Highest  Numbers[Count]
13 ENDIF
14 NEXT Count
15 OUTPUT "The highest number is ", Highest
16 OUTPUT "The total is ", Total
17 OUTPUT "The average is ", Total / 1000

6(b) One mark per mark point 2


MP1 Correct use of ROUND function to round the average
MP2 … set to 2 decimal places with OUTPUT command.

Example:
OUTPUT ROUND(Total / 1000, 2)

6(c) One mark per mark point, max four 4


MP1 Declaration of new variable for smallest value at start of algorithm/before it is used
MP2 Initialisation of smallest variable to a high number / the first input
MP3 New selection statement after input to compare input with current smallest number
MP4 If input is smaller than current smallest variable, it should replace it
MP5 Outside the loop, output the current value of the smallest variable.

© Cambridge University Press & Assessment 2025 Page 11 of 21


0478/22 Cambridge IGCSE – Mark Scheme February/March 2025
PUBLISHED
Question Answer Marks

7(a) One mark per correct column 5

Answer Value1 Operator Value2 OUTPUT

Continue?

Y 7 S 9 −2

Continue?

Y 5 M 12 60

Continue?

Y 25 D 5 5

Continue?

7(b) It is a calculator. 1

© Cambridge University Press & Assessment 2025 Page 12 of 21


0478/22 Cambridge IGCSE – Mark Scheme February/March 2025
PUBLISHED
Question Answer Marks

7(c)(i) One mark per mark point 3


MP1 Include two process boxes
MP2 … after the Answer and Operator input boxes
MP3 Use of UCASE in both boxes to change the input given to upper case.

OR

One mark per mark point


MP4 Change the condition in all the (4) decision boxes
MP5 … for the variables Answer and Operator
MP6 Using OR e.g. OR Answer = 'y' and OR Operator = 'a'

7(c)(ii) One mark, for example: 1


Only tests for A, S, and M; any other input is assumed to be D (for division)
Divide by 0 error (if D and 0 are entered)
Wrong data type e.g. character instead of number
No data entered (enter without a preceding value)
If Yes/yes entered the algorithm stops
No input prompts.

Question Answer Marks

8(a) One mark per correct answer 2


Fields: 6
Records: 23

8(b) One mark per correct answer 2


Primary key field: Code
Reason: It is the only field with unique contents. // It is a unique identifier

© Cambridge University Press & Assessment 2025 Page 13 of 21


0478/22 Cambridge IGCSE – Mark Scheme February/March 2025
PUBLISHED
Question Answer Marks

8(c) One mark per mark point 3


MP1 Correct data present – spelt correctly
MP2 Correct layout – three columns, with no additional punctuation
MP3 Correct order and no integrity errors

Correct output
Valencia Venezuela 1,983,445
Lima Peru 11,206,000
Buenos Aires Argentina 15,490,415

8(d) One mark per mark point 4


MP1 At least two correct fields in SELECT
MP2 Remaining two correct fields in SELECT
MP3 FROM MajorCity
MP4 WHERE Capital = TRUE;

Correct code:
SELECT Code, City, Country, Continent
FROM MajorCity
WHERE Capital = TRUE;

© Cambridge University Press & Assessment 2025 Page 14 of 21


0478/22 Cambridge IGCSE – Mark Scheme February/March 2025
PUBLISHED
Question Answer Marks

9(a) One mark for each correct gate, with the correct input(s) as shown. 5

B Z

© Cambridge University Press & Assessment 2025 Page 15 of 21


0478/22 Cambridge IGCSE – Mark Scheme February/March 2025
PUBLISHED
Question Answer Marks

9(b) Four marks for all eight correct outputs 4


Three marks for six or seven correct outputs
Two marks for four or five correct outputs
One mark for two or three correct outputs

A B C Z

0 0 0 1

0 0 1 0

0 1 0 1

0 1 1 1

1 0 0 1

1 0 1 0

1 1 0 0

1 1 1 0

© Cambridge University Press & Assessment 2025 Page 16 of 21


0478/22 Cambridge IGCSE – Mark Scheme February/March 2025
PUBLISHED
Question Answer Marks

10 Marks are available for: 15


• AO2 (maximum 9 marks)
• AO3 (maximum 6 marks)

Data structures required with names as given in the scenario:


Arrays or lists MemberID[], Name[]
Variables NewID

Requirements (techniques)
R1 displays menu and allows choice, then proceeds based on valid choice, (nested iteration, input, output, selection,
validation).
R2 checks length of string, checks contents of array for matches, stores approved data
(validation, string handling (length), selection, input, storage).
R3 outputs contents of arrays. Program continues until user chooses stop.
(output, iteration).

© Cambridge University Press & Assessment 2025 Page 17 of 21


0478/22 Cambridge IGCSE – Mark Scheme February/March 2025
PUBLISHED
Question Answer Marks

10 Example 15-mark answer in pseudocode


// Array and variable declaration – not required in candidates’ responses
REPEAT
// Display of menu choices
OUTPUT "Enter 1 to input a new member, 2 to output member codes and
first and last names, or 3 to stop "
// Input menu choice with validation of input
REPEAT
INPUT Answer
IF Answer < 1 OR Answer > 3
THEN
OUTPUT "You must input 1, 2 or 3. Please try again "
ENDIF
UNTIL Answer >= 1 AND Answer <= 3
// User chooses to input new member details
IF Answer = 1
THEN
REPEAT
// Initialisation of flag for previous use of code
Used  FALSE
// User enters new code, with prompt
OUTPUT "Enter a new six-character membership code "
INPUT Code
// Checking code is 6 characters long
IF LENGTH(Code) <> 6
THEN
// If code is wrong length, re-entry required
OUTPUT "The code must contain six characters, please try again."
ELSE
// If code is correct length, it is checked with
// with previous codes for uniqueness
IndexCheck  1
WHILE MemberID[IndexCheck] <> "" AND NOT Used DO
IF Code = MemberID[IndexCheck]

© Cambridge University Press & Assessment 2025 Page 18 of 21


0478/22 Cambridge IGCSE – Mark Scheme February/March 2025
PUBLISHED
Question Answer Marks

10 THEN
// If code already used, flag changed and re-entry required
Used  TRUE
OUTPUT "This code has already been used,
please try again "
ELSE
IndexCheck  IndexCheck + 1
ENDIF
ENDWHILE
// If code correct length and not previously used
// it is stored, along with first and last name
IF NOT Used
THEN
MemberID[IndexCheck]  Code
OUTPUT "Enter your first name "
INPUT Name[IndexCheck, 1]
OUTPUT "Enter your last name "
INPUT Name[IndexCheck, 2]
ENDIF
ENDIF
UNTIL LENGTH(Code) = 6 AND NOT Used
ENDIF
// User chooses to output all member details
IF Answer = 2
THEN
IndexOut  1
// All array contents output using iteration
WHILE MemberID[IndexOut] <> ""
OUTPUT "Membership code: ", MemberID[IndexOut]
OUTPUT "First name: ", Name[IndexOut, 1]
OUTPUT "Last name: ", Name[IndexOut, 2]
IndexOut  IndexOut + 1
ENDWHILE
ENDIF
UNTIL Answer = 3

© Cambridge University Press & Assessment 2025 Page 19 of 21


0478/22 Cambridge IGCSE – Mark Scheme February/March 2025
PUBLISHED
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 technique Some programming techniques used The range of programming techniques
has been used. are appropriate to the problem. used is appropriate to the problem.

Any use of selection, iteration, counting, More than one technique seen applied All criteria stated for the scenario have
totalling, input and output. to the scenario, check the list of been covered by the use of appropriate
techniques needed. programming techniques, check the list
No creditable of 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
required. required.
Any use of variables or arrays or other
language dependent data structures More than one data structure used to The data structures used store all the
e.g. Python lists. store data required by the scenario. data required by the scenario.

© Cambridge University Press & Assessment 2025 Page 20 of 21


0478/22 Cambridge IGCSE – Mark Scheme February/March 2025
PUBLISHED
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).

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 have Most of the data structures used 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.
No creditable The solution is inaccurate in many The solution contains parts that are The solution is accurate.
response. places. inaccurate.
Solution logically performs all the tasks
Solution contains few lines of code with Solution contains lines of code with given in the scenario. Ignore minor
errors that attempt to perform a task some errors that logically perform tasks syntax errors.
given in the scenario. given in the scenario. Ignore minor
syntax errors.

The solution attempts at least one of the The solution attempts to meet most of The solution meets all the requirements
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 the attempt most tasks given in the the scenario.
scenario. scenario.

© Cambridge University Press & Assessment 2025 Page 21 of 21


Cambridge IGCSE™

COMPUTER SCIENCE 0478/21


Paper 2 Algorithms, Programming and Logic May/June 2025
MARK SCHEME
Maximum Mark: 75

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 May/June 2025 series f or most
Cambridge IGCSE, Cambridge International A and AS Level components, and some Cambridge O Level
components.

This document consists of 19 printed pages.

© Cambridge University Press & Assessment 2025 [Turn over


0478/21 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Generic Marking Principles

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.

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 assess ed 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.

© Cambridge University Press & Assessment 2025 Page 2 of 19


0478/21 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
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 fu ll 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 thre sholds or
grade descriptors in mind.

© Cambridge University Press & Assessment 2025 Page 3 of 19


0478/21 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Annotations guidance for centres

Examiners use a system of annotations as a shorthand for communicating their marking decisions to one another. Examiners are trained during the
standardisation process on how and when to use annotations. The purpose of annotations is to inform the standard isation and monitoring
processes and guide the supervising examiners when they are checking the work of examiners within their team. The meaning of annotations and
how they are used is specific to each component and is understood by all examiners who mark the component.

We publish annotations in our mark schemes to help centres understand the annotations they may see on copies of scripts. Note that there may
not be a direct correlation between the number of annotations on a script and the mark awarded. Similarly, the use of an annotation may not be an
indication of the quality of the response.

The annotations listed below were available to examiners marking this component in this series.

Annotations

Annotation Meaning

Correct point

Incorrect point

Follow through

Repetition

Ignore

Benefit of doubt given

Content of response too vague

Not answered question

Omission

Section not relevant

© Cambridge University Press & Assessment 2025 Page 4 of 19


0478/21 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Annotation Meaning

Section incorrect

Highlighter Highlights part of the answer or shows structure of complex answers

Page or response seen by examiner

AO2 mark

AO3 mark

Not enough

Required item one

Required item two

Required item three

Correct awarding one mark

Correct awarding two marks

Correct awarding three marks

Correct awarding four marks

Correct awarding five marks

Correct awarding six marks

Correct awarding seven marks

Correct awarding eight marks

Correct awarding nine marks

© Cambridge University Press & Assessment 2025 Page 5 of 19


0478/21 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Mark scheme abbreviations
/ separates alternative words / phrases within a marking point
// separates alternative answers within a marking point
underline actual word given must be used by candidate (grammatical variants accepted)
max indicates the maximum number of marks that can be awarded
() the word / phrase in brackets is not required, but sets the context

Note: No marks are awarded for using brand names of software packages or hardware.

© Cambridge University Press & Assessment 2025 Page 6 of 19


0478/21 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

1 C 1

Question Answer Marks

2(a) One mark for each correct line. 4

Requirement Validation Check

Date of birth must be between


01/01/1900 and 01/01/2010. length check

format check
Name has been entered.

range check
Password has exactly 12
characters.
check digit
check.
Student ID must contain 2 letters presence check
followed by 4-digit number.

2(b) One mark for check, two marks for description. 3

• Visual check [1] …


• …look at the data that has been entered [1] and confirm it matches [1]
• Double entry check [1] …
• …enter data twice [1] and only accept identical values [1]

© Cambridge University Press & Assessment 2025 Page 7 of 19


0478/21 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

3 One mark per bullet point 4

• Initialising a count variable outside of loop


• Correct use of loop with condition for 10 times (WHILE (DO)...ENDWHILE, REPEAT...UNTIL) with close
• Incrementing the count variable inside the loop
• Rest of algorithm correct

Examples

Count ← 1
REPEAT
OUTPUT "Please enter a name"
INPUT Name
Names[Count] ← Name
Count ← Count + 1
UNTIL Count > 10

Or

Count ← 1
WHILE Count <= 10 DO
OUTPUT "Please enter a name"
INPUT Name
Names[Count] ← Name
Count ← Count + 1
ENDWHILE

© Cambridge University Press & Assessment 2025 Page 8 of 19


0478/21 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

4(a) One mark per bullet point. Max 5 5

• Correct input of number


• Use of substring ( )
• …to extract the correct number
• Correct use of IF statements/Case statement with matching END IF / END CASE
• Output of matching locations
• Output of unknown

Example

OUTPUT "Please enter a telephone number "


INPUT Telephone
Value ← SUBSTRING(Telephone, 2, 2)
IF Value = "44"
THEN
OUTPUT "UK"
ELSE
IF Value = "20"
THEN
OUTPUT "Egypt"
ELSE
OUTPUT "Unknown"
ENDIF
ENDIF

4(b) One mark per bullet point. Max 3 3

• Find length of input.


• Use a suitable loop (repeat/while).
• Using the correct condition
• Prompt for a 13-digit telephone number and input number inside loop.

© Cambridge University Press & Assessment 2025 Page 9 of 19


0478/21 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

5 One mark for each bullet point 4

• MOD – returns the remainder of a division calculation.


• Example: X ← MOD(10, 3)
• DIV – Integer division/returns the quotient of a division.
• Example: Y ← DIV(10, 3)

Question Answer Marks

6(a) One mark for each line identified and corrected. 4

Line 02 – should be N ← ROUND(RANDOM() * 99, 0) + 1


Line 12 – should be OUTPUT "The number is higher than your guess"
Line 14/15 - Counter ← Counter + 1 should be placed after Line 15/After ENDIF/before UNTIL G = N/before Line
16
Line 17 – should be OUTPUT "Well done, you took ", Counter, " attempts"

6(b) One mark for method, one mark for example – max 2. 2

• Meaningful identifiers, N should be Number.


• Comments, // loops until the guess equals the number
• Procedures/functions, making the algorithm a procedure/function

© Cambridge University Press & Assessment 2025 Page 10 of 19


0478/21 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

7(a) One mark for each correct gate, with the correct input(s) as shown. 4

B X

7(b) 4
A B C X 4 marks for 8 correct outputs
3 marks for 6/7 correct outputs
0 0 0 1 2 marks for 4/5 correct outputs
1 mark for 2/3 correct outputs
0 0 1 0

0 1 0 1

0 1 1 1

1 0 0 1

1 0 1 0

1 1 0 0

1 1 1 0

© Cambridge University Press & Assessment 2025 Page 11 of 19


0478/21 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

8(a)(i) Boolean 1

8(a)(ii) There are only 2 responses / Only Yes and No / True and False 1

8(b) Two marks for all three correct 2


One mark for one/two correct

BC02 The Fountain 9:10


BC08 Sunset Quay 12:01
BC27 The University 16:45

8(c) One mark per correct statement 3

SELECT Destination
FROM BUS
WHERE Return = Yes;

© Cambridge University Press & Assessment 2025 Page 12 of 19


0478/21 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

9(a) One mark for each correct line 2

DECLARE A: INTEGER
DECLARE B: STRING

9(b) One mark for using FUNCTION and ENDFUNCTION and RETURNS STRING 6
One mark for naming the function Odds.
One mark for defining the parameter correctly.
One mark for determining if odd/even using MOD/DIV/ROUND using parameter.
One mark for correctly returning ‘Odd’ and ‘Even’.
One mark for correct function call

Example:

FUNCTION Odds(X: INTEGER) RETURNS STRING


IF MOD(X, 2) = 0
THEN
RETURN "Even"
ELSE
RETURN "Odd"
ENDIF
ENDFUNCTION

B ← Odds(A)

© Cambridge University Press & Assessment 2025 Page 13 of 19


0478/21 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

10(a) One mark for each correct column 3

Score Grade OUTPUT

21 D You achieved a D

46 C You achieved a C

63 C You achieved a C

91 C You achieved a C

12 D You achieved a D

Candidates can be awarded all three marks if they have provided only the correct first row.

10(b) One mark per bullet point. Max four 4

• Change the decision in the first decision box to IS Score >= 80 ?


• Change the decision in the last decision box to IS Score >= 40 ?
• Change process box from Grade  "C" to Grade  "A"
• Change process box from Grade  "A" to Grade  "C"
• Add output box instructing users to input score or input −1 before the input box // initialising a counter // incrementing
counter.
• Add decision box for loop with exit condition.
• Correct arrows to show looping

© Cambridge University Press & Assessment 2025 Page 14 of 19


0478/21 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

11 Marks are available for: 15

• 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
CompetitorName, CompetitorScore, Points

Requirements (techniques)
R1 inputs and validates the points for each event for each competitor (nested iteration, iteration, input, output)
R2 finds and outputs the name of the competitors with the highest score for each event (nested iteration, output and
selection)
R3 totals the score for each competitor, finds and outputs the names with the highest score for all five events(iteration,
totalling, output and selection)

© Cambridge University Press & Assessment 2025 Page 15 of 19


0478/21 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

11 Example 15-mark answer in pseudocode. 15

// meaningful identifier names and appropriate data structures (variables, constants and the given arrays) to store all the
data required. Note that candidates did not need to declare any arrays or variables as stated in the question paper.

DECLARE Points : ARRAY [1 : 25] OF REAL


DECLARE Highest : ARRAY [1 : 5] OF REAL

Winner  0
Max  0

FOR Count  1 TO 25 //initialising array


Points[Count]  0
NEXT Count

FOR Count  1 TO 5 //initialising array


Highest[Count]  0
NEXT Count

Requirement 1

FOR Event  1 TO 5
For X  1 TO 25 // loops through each entrant
REPEAT
OUTPUT "Please enter a score between 0 and 100 for ", Competitor[X], " for
event ", Event
INPUT Score
UNTIL Score >= 0 AND Score <= 100 //validates score
CompetitorScore[X, Event]  Score //stores score for each Event
Points[X]  Points[X] + Score //can total score here
NEXT X
NEXT Event

© Cambridge University Press & Assessment 2025 Page 16 of 19


0478/21 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

11 Requirement 2 15

FOR Event  1 TO 5
For X  1 TO 25
IF CompetitorScore[X, Event] > Highest[Event] //calculates the highest score
THEN
Highest[Event] = CompetitorScore[X, Event]
ENDIF
NEXT X
NEXT Event

FOR Event  1 TO 5 //outputs the names of competitors with the highest score
For X  1 TO 25
OUTPUT "The winner of a medal for the highest score in event ", Event
IF CompetitorScore[X, Event] = Highest[Event]
THEN
OUTPUT CompetitorName[X]
ENDIF
NEXT X
NEXT Event

Requirement 3

//points may be calculated here


For X  1 TO 25 //calculates the highest points scored for the five events
IF Points[X] > Max
THEN
Max  Points[X]
ENDIF
NEXT X

© Cambridge University Press & Assessment 2025 Page 17 of 19


0478/21 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

11 //outputs the names of the competitors with the highest score 15


OUTPUT "The competitors with the highest score for the five events"
For X  1 TO 25
IF Points[X] = Max
THEN
OUTPUT CompetitorName[X]
ENDIF
NEXT X

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

No creditable At least one programming Some programming techniques The range of programming
response. technique has been used. used are appropriate to the techniques used is appropriate
Any use of selection, iteration, problem. to the problem.
counting, totalling, input and More than one technique seen All criteria stated for the
output. applied to the scenario, check scenario have been covered by
the list of techniques needed. the use of appropriate
programming techniques,
check the list of techniques
needed.

Some data has been stored but Some of the data structures The data structures chosen are
not appropriately. chosen are appropriate and appropriate and store all the
Any use of variables or arrays store some of the data data required.
or other language dependent required. The data structures used store
data structures e.g. Python More than one data structure all the data required by the
lists. used to store data required by scenario.
the scenario.

© Cambridge University Press & Assessment 2025 Page 18 of 19


0478/21 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

11 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

No creditable Program seen without relevant Program seen with some The program has been fully
response. comments. relevant comment(s). commented.

Some identifier names used The majority of identifiers used Suitable identifiers with names
are appropriate. are appropriately named. meaningful to their purpose
Some of the data structures Most of the data structures have been used throughout.
used have meaningful names. used have meaningful names. All the data structures used
have meaningful names.

The solution is illogical. The solution contains parts that The program is in a logical
may be illogical. order.

The solution is inaccurate in The solution contains parts that The solution is accurate.
many places. are inaccurate. Solution logically performs all
Solution contains few lines of Solution contains lines of code the tasks given in the scenario.
code with errors that attempt to with some errors that logically Ignore minor syntax errors.
perform a task given in the perform tasks given in the
scenario. scenario. Ignore minor syntax
errors.

The solution attempts at least The solution meets most of the The solution meets all the
one of the requirements. requirements. requirements given in the
Solution contains lines of code Solution contains lines of code question.
that attempt at least one task that perform most tasks given Solution performs all the tasks
given in the scenario. in the scenario. given in the scenario.

© Cambridge University Press & Assessment 2025 Page 19 of 19


Cambridge IGCSE™

COMPUTER SCIENCE 0478/22


Paper 2 Algorithms, Programming and Logic May/June 2025
MARK SCHEME
Maximum Mark: 75

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 May/June 2025 series f or most
Cambridge IGCSE, Cambridge International A and AS Level components, and some Cambridge O Level
components.

This document consists of 13 printed pages.

© Cambridge University Press & Assessment 2025 [Turn over


0478/22 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED

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
descriptions 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.

© Cambridge University Press & Assessment 2025 Page 2 of 13


0478/22 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED

Annotations guidance for centres

Examiners use a system of annotations as a shorthand for communicating their marking decisions to
one another. Examiners are trained during the standardisation process on how and when to use
annotations. The purpose of annotations is to inform the standard isation and monitoring processes
and guide the supervising examiners when they are checking the work of examiners within their team.
The meaning of annotations and how they are used is specific to each component and is understood
by all examiners who mark the component.

We publish annotations in our mark schemes to help centres understand the annotations they may
see on copies of scripts. Note that there may not be a direct correlation between the number of
annotations on a script and the mark awarded. Similarly, the use of an annotation may not be an
indication of the quality of the response.

The annotations listed below were available to examiners marking this component in this series.

Annotations

Annotation Meaning

Correct point

Incorrect point

Follow through

Repetition

Ignore

Benefit of doubt given

Content of response too vague

Not answered question

Omission

Section not relevant

Section incorrect

Highlighter Highlights part of the answer or shows structure of complex answers

Page or response seen by examiner

AO2 mark

AO3 mark

Not enough

Required item one

© Cambridge University Press & Assessment 2025 Page 3 of 13


0478/22 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED

Annotation Meaning

Required item two

Required item three

Correct awarding one mark

Correct awarding two marks

Correct awarding three marks

Correct awarding four marks

Correct awarding five marks

Correct awarding six marks

Correct awarding seven marks

Correct awarding eight marks

Correct awarding nine marks

Mark scheme abbreviations

/ separates alternative words / phrases within a marking point


// separates alternative answers within a marking point
underline actual word given must be used by candidate (grammatical variants accepted)
max indicates the maximum number of marks that can be awarded
() the word / phrase in brackets is not required, but sets the context

Note: No marks are awarded for using brand names of software packages or hardware.

© Cambridge University Press & Assessment 2025 Page 4 of 13


0478/22 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED

Question Answer Marks

1 D 1

Question Answer Marks

2 One mark for each correct line, max three 3

Component part Example statements

the height of the f ence


the length of the f ence
process

The amount of paint required is 40


square metres.

output

the colour of the paint

input
The area of fence is calculated as
40 square metres.

Question Answer Marks

3 One mark per correct piece of test data, 4

Normal test data: −50 (any integer value between 0 and −100, inclusive)
Abnormal test data: 50 (any value outside the range 0 and −100, inclusive, or
any non-numeric input and non-integers
Extreme test data: 0 // −100
Boundary test data: 1 // 0 // −100 // −101

Question Answer Marks

4(a) To check that the value entered has not changed on input. 1

© Cambridge University Press & Assessment 2025 Page 5 of 13


0478/22 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED

Question Answer Marks

4(b) One mark per mark point, max six 6

MP1 At least one appropriate working loop


MP2 First inputs of numbers all stored in array Numbers
MP3 Correct second input made for each number
MP4 Working selection statement to compare first and second inputs one at
a time
MP5 If numbers don’t match, appropriate output, including both values input
and a message requiring re-input
MP6 New input stored in current array location (replacing original input)
MP7 Final output confirming completion, outside loop.

For example,

// variable and array declarations or initialisations


// are not required for this question
FOR Index  1 TO 10
INPUT Numbers[Index]
NEXT Index
FOR Index  1 TO 10
INPUT CheckNumber
IF CheckNumber <> Numbers[Index]
THEN
OUTPUT CheckNumber, " and ", Numbers[Index], " do
not match. Please re-enter the number. "
INPUT Numbers[Index]
ENDIF
NEXT Index
OUTPUT "The check has been completed."

© Cambridge University Press & Assessment 2025 Page 6 of 13


0478/22 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED

Question Answer Marks

5(a) One mark per mark point 5

• Line 01 / DECLARE Names : ARRAY[1:500] OF REAL


should be DECLARE Names : ARRAY[1:500] OF STRING

• Line 09 / Total  100


should be Total  0

• Line 11 / INPUT Names[Index]


should be INPUT Names[Counter]

• Line 13 / Total  Counter + Heights[Counter]


should be Total  Total + Heights[Counter]

• Line 20 / OUTPUT "The shortest height is ", Heights


should be OUTPUT "The shortest height is ", Shortest
or OUTPUT "The shortest height is ", Heights[Index]

01 DECLARE Names : ARRAY[1:500] OF STRING


02 DECLARE Heights : ARRAY[1:500] OF REAL
03 DECLARE Shortest : REAL
04 DECLARE Total : REAL
05 DECLARE Counter : INTEGER
06 DECLARE Index : INTEGER
07 Shortest  500
08 Index  0
09 Total  0
10 FOR Counter  1 TO 500
11 INPUT Names[Counter]
12 INPUT Heights[Counter]
13 Total  Total + Heights[Counter]
14 IF Heights[Counter] < Shortest
15 THEN
16 Shortest  Heights[Counter]
17 Index  Counter
18 ENDIF
19 NEXT Counter
20 OUTPUT "The shortest height is ", Shortest
21 OUTPUT "The shortest person is ", Names[Index]
22 OUTPUT "The average height is ", Total / 500

5(b) One mark per mark point 2

MP1 Output statement with correct calculation of average, or use of a


variable average.
MP2 Correct use of ROUND function set to 1 decimal place.

For example,

OUTPUT ROUND(Total / 500, 1)

© Cambridge University Press & Assessment 2025 Page 7 of 13


0478/22 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED

Question Answer Marks

5(c) One mark per statement, max four 4

MP1 Declaration of new variable for tallest person / largest value at start of
algorithm
MP2 Initialisation of largest variable to a low number e.g. 0
MP3 New selection statement after input of height to compare it with current
largest value
MP4 If input of height is larger than current largest variable, it should become
the new largest value
MP5 Outside the loop, output the current value of the largest variable.

Question Answer Marks

6(a) One mark per mark point 6

MP1 Correct Number and Index columns


MP2 Correct Word column
MP3 Correct Continue column
MP4 Correct V1 and V2 column
MP5 Correct L1 and L2 column
MP6 Correct OUTPUT column

Number Index Word Continue V1 V2 L1 L2 OUTPUT

2 1 RACECAR TRUE 1 7 R R

2 6 A A

3 5 C C

4 4

Successful

2 TREAT TRUE 1 5 T T

2 4 R A

FALSE NOT
successful

6(b) Finds words that read the same forwards and backwards. 1

© Cambridge University Press & Assessment 2025 Page 8 of 13


0478/22 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED

Question Answer Marks

6(c) One mark per mark point, max three 3

MP1 Uses an index to mark the start and end of each word // uses V1 to
mark the start of the word and V2 to mark the end
MP2 After each check, these are moved to the next character in the word at
each end of the word // V1 is incremented by 1 and V2 is decremented
by 1 after each check.
MP3 When the two indexes match or cross, the whole word has been
checked // When V1 = V2 or V1 > V2, the whole word has been
checked
MP4 The algorithm will exit if it is found that two compared letters are not the
same.

© Cambridge University Press & Assessment 2025 Page 9 of 13


0478/22 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED

Question Answer Marks

7(a) One mark per mark point, max six 6


MP1 input Value
MP2 correct check that Value is
between −20 and 50,
exclusive
MP3 totalling values
MP4 counting number of values
MP5 checking Count = 50 / >= 50
MP6 output of total and average

START

Count  0

Total  0

INPUT Value

No IS Value <= Yes


Total  Total + Value –20 OR Value
>= 50 ?

IS Count = 50 No
Count  Count + 1 ?

Yes

OUTPUT Total

OUTPUT Total/50

STOP

7(b) One mark per statement 4

MP1 Change INPUT Value so that it saves values into an array


MP2 … using the counter as the index
MP3 Outside the (first) loop, set up a loop that will iterate 50 times
MP4 Use an output statement inside the (second) loop to output the contents
of the array, using the counter as the index.

© Cambridge University Press & Assessment 2025 Page 10 of 13


0478/22 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED

Question Answer Marks

8(a) One mark for the logic gate and one mark for the truth table 2

XOR logic gate symbol:

Truth table:

A B X

0 0 0

0 1 1

1 0 1

1 1 0

8(b)(i) One mark per mark point 2

MP1 A AND
MP2 (NOT B OR NOT C) // NOT(B AND C) // (B NAND C)

Or

One mark per mark point

MP3 A AND NOT B


MP4 OR A AND NOT C

Example answers

(X =) A AND (NOT B OR NOT C) // A AND NOT (B AND C) // A AND (B NAND


C)
(X =) A AND NOT B OR A AND NOT C

© Cambridge University Press & Assessment 2025 Page 11 of 13


0478/22 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED

Question Answer Marks

8(b)(ii) Four marks for eight correct outputs 4


Three marks for six or seven correct outputs
Two marks for four or five correct outputs
One mark for two or three correct outputs

A B C X

0 0 0 0

0 0 1 0

0 1 0 0

0 1 1 0

1 0 0 1

1 0 1 1

1 1 0 1

1 1 1 0

Question Answer Marks

9(a) Two marks for all four fields correctly identified 2


One mark for two or three fields correctly identified

Data type Field

Boolean Subway

integer Population // Founded // Identification

real AverageIncome

text Name // Country // Continent // Identification

9(b) One mark per mark point 4

MP1 All correct fields in SELECT


MP2 Correct use of key word FROM
MP3 Correct field in WHERE: Continent
MP4 Correct criterion in WHERE: "Asia" // 'Asia'

Correct code:

SELECT Name, Country, Population


FROM CapitalCity
WHERE Continent = "Asia"; // 'Asia';

© Cambridge University Press & Assessment 2025 Page 12 of 13


0478/22 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED

Question Answer Marks

10 Due to an issue with this question, the question has been removed from the 15
question paper.

© Cambridge University Press & Assessment 2025 Page 13 of 13


Cambridge IGCSE™

COMPUTER SCIENCE 0478/23


Paper 2 Algorithms, Programming and Logic May/June 2025
MARK SCHEME
Maximum Mark: 75

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 May/June 2025 series f or most
Cambridge IGCSE, Cambridge International A and AS Level components, and some Cambridge O Level
components.

This document consists of 23 printed pages.

© Cambridge University Press & Assessment 2025 [Turn over


0478/23 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Generic Marking Principles

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.

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 assess ed 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.

© Cambridge University Press & Assessment 2025 Page 2 of 23


0478/23 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
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 fu ll 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 thre sholds or
grade descriptors in mind.

© Cambridge University Press & Assessment 2025 Page 3 of 23


0478/23 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Annotations guidance for centres

Examiners use a system of annotations as a shorthand for communicating their marking decisions to one another. Examiners are trained during the
standardisation process on how and when to use annotations. The purpose of annotations is to inform the standard isation and monitoring
processes and guide the supervising examiners when they are checking the work of examiners within their team. The meaning of annotations and
how they are used is specific to each component and is understood by all examiners who mark the component.

We publish annotations in our mark schemes to help centres understand the annotations they may see on copies of scripts. Note that there may
not be a direct correlation between the number of annotations on a script and the mark awarded. Similarly, the use of an annotation may not be an
indication of the quality of the response.

The annotations listed below were available to examiners marking this component in this series.

Annotations

Annotation Meaning

Correct point

Incorrect point

Follow through

Repetition

Ignore

Benefit of doubt given

Content of response too vague

Not answered question

Omission

Section not relevant

© Cambridge University Press & Assessment 2025 Page 4 of 23


0478/23 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Annotation Meaning

Section incorrect

Highlighter Highlights part of the answer or shows structure of complex answers

Page or response seen by examiner

AO2 mark

AO3 mark

Not enough

Required item one

Required item two

Required item three

Correct awarding one mark

Correct awarding two marks

Correct awarding three marks

Correct awarding four marks

Correct awarding five marks

Correct awarding six marks

Correct awarding seven marks

Correct awarding eight marks

Correct awarding nine marks

© Cambridge University Press & Assessment 2025 Page 5 of 23


0478/23 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Mark scheme abbreviations
/ separates alternative words / phrases within a marking point
// separates alternative answers within a marking point
underline actual word given must be used by candidate (grammatical variants accepted)
max indicates the maximum number of marks that can be awarded
() the word / phrase in brackets is not required, but sets the context

Note: No marks are awarded for using brand names of software packages or hardware.

© Cambridge University Press & Assessment 2025 Page 6 of 23


0478/23 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

1(a) One mark per mark point 6

MP1 input Weight


MP2 correct check for Weight = –1
MP3 correct check for Weight between 16.2 and 17.2 inclusive
MP4 correct increment for PassCount
MP5 correct increment for RejectCount
MP6 output PassCount and RejectCount
START

PassCount  0

RejectCount  0

INPUT
Weight

Yes
IS Weight = –1
No ?

OUTPUT
IS Weight >= 16.2 No PassCount
AND Weight <= 17.2
?

Yes OUTPUT
RejectCount
PassCount  PassCount + 1

RejectCount  RejectCount + 1

STOP

© Cambridge University Press & Assessment 2025 Page 7 of 23


0478/23 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

1(b) One mark per mark point, max four 4

MP1 Initialise a new variable at the start of the flowchart to total the biscuit weights.
MP2 Near the point where PassCount is incremented/after the yes for the weight decision box, add a new process
(box)
MP3 … to add the weight of the current biscuit to the running total weight.
MP4 Outside the loop, calculate the average weight as total weight divided by number of biscuits that passed
(PassCount)
MP5 Output the average weight, outside the loop.

Question Answer Marks

2 One mark for each correct line, max three 3

Use of arithmetic operator Result


5
355 DIV 10

355
355 / 10
35

355 MOD 10
35.5

© Cambridge University Press & Assessment 2025 Page 8 of 23


0478/23 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

3(a) One mark per mark point 4

• Line 02 / DECLARE Index : CHAR


should be DECLARE Index : INTEGER

• Line 07 / Stop  FALSE


should be Stop  TRUE

• Line 08 / FOR Index  1 TO 50


should be FOR Index  1 TO 999 // FOR Index  1 TO 1000 - 1

• Line 17 / NEXT Stop


should be ENDWHILE

3(b)(i) One mark per mark point 4

MP1 Two integer parameters in PROCEDURE line


MP2 Correct index assigned to Hold  Values[Index1]
MP3 Array element correctly assigned to new array element (Index2 to Index1)
MP4 Value in Hold assigned to correct array element (Index2).

For example,

PROCEDURE Swap(Index1 : INTEGER, Index2 : INTEGER)


DECLARE Hold : REAL
Hold  Values[Index1]
Values[Index1]  Values[Index2]
Values[Index2]  Hold
ENDPROCEDURE

© Cambridge University Press & Assessment 2025 Page 9 of 23


0478/23 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

3(b)(ii) One mark per mark point 2

MP1 Correct call command and use of Swap for procedure name
MP2 Two parameters referring to the correct indices of array elements to be swapped, as shown in the original
algorithm. Index + 1 and Index.

For example,

CALL Swap(Index + 1, Index)

3(c) One mark per mark point 2

MP1 Global variables can be used throughout the program and its procedures // The memory used by the variables is
not recovered until the program terminates.
MP2 The variable declared in part 3(b)(i) is a local variable and can only be used in that procedure // The memory
used by a local variable is recovered at the end of the procedure.

Question Answer Marks

4(a)(i) Range (check) 1

4(a)(ii) One mark per correct piece of test data, max two 4
One mark per correct reason, max two

Abnormal test data: 150 (any non-integer or any value outside the range 10 and 95)
Reason: This data is out of range so should be rejected

Extreme test data: 10 // 95


Reason: This is the smallest data entry that will be accepted // This is the largest data entry that will be accepted.

4(b)(i) Length (check) 1

© Cambridge University Press & Assessment 2025 Page 10 of 23


0478/23 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

4(b)(ii) One mark per mark point, max five 5

MP1 Appropriate condition-controlled loop


MP2 Password input to a variable
MP3 Use of LENGTH function to find password length
MP4 Selection statement to check password length is at least 12
MP5 Error message if length incorrect inside loop
MP6 Correct loop termination for password of correct length.

For example,

// Variable declarations are not required for this question


REPEAT
INPUT Password
IF LENGTH(Password) < 12
THEN
OUTPUT "Password too short, please try again"
ENDIF
UNTIL LENGTH(Password) >= 12

© Cambridge University Press & Assessment 2025 Page 11 of 23


0478/23 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

5(a) Four marks for all eight data types correct 4


Three marks for six or seven data types correct
Two marks for four or five data types correct
One mark for two or three data types correct

Field Data type Description

ID text // integer unique identifier

Name text component name

Description text component description

Price real selling price of component to 2


decimal places

NumberAvailable integer number in stock

MinimumLevel integer level at which the component


is reordered

ReOrdered Boolean whether or not the component


has been reordered

DateOrdered date/time the last date the component


was reordered

© Cambridge University Press & Assessment 2025 Page 12 of 23


0478/23 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

5(b) One mark per mark point 4

MP1 All correct fields in SELECT in any order


MP2 Correct table name in FROM: COMPONENT
MP3 Correct field in WHERE: ReOrdered (=)
MP4 Correct criterion in WHERE: (=) TRUE

Correct code:

SELECT ID, Name, DateOrdered


FROM COMPONENT
WHERE ReOrdered = TRUE ;

© Cambridge University Press & Assessment 2025 Page 13 of 23


0478/23 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

6(a) One mark per mark point 5

MP1 Correct Word and Letter columns


MP2 Correct Index column
MP3 Correct Store(1, 3, 4, 6, 8) columns (consonants)
MP4 Correct Store(2, 5, 7) columns (vowels)
MP5 Correct OUTPUT Column

Store[]
Word Index Letter [1] [2] [3] [4] [5] [6] [7] [8] OUTPUT

COMPUTER 1 C C
2 O
3 M M

4 P P
5 U
6 T T

7 E
8 R R
1 C

2
3 M
4 P
5

© Cambridge University Press & Assessment 2025 Page 14 of 23


0478/23 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

6(a)
6 T
7

8 R

6(b) One mark per mark point, max three 3

MP1 Each letter of a word is checked to see if it is A, E, I, O or U / a vowel


MP2 Vowels are changed to the null string using a case statement
MP3 Each letter or null string is individually stored in an array
MP4 All consonants are output.

7(a) One mark for the logic gate and one mark for the truth table 2

NOR Logic gate symbol:

Truth table:

A B Z

0 0 1

0 1 0

1 0 0

1 1 0

© Cambridge University Press & Assessment 2025 Page 15 of 23


0478/23 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

7(b)(i) One mark per mark point, max two directly from the problem 2

MP1 NOT L AND (M OR S)


MP2 OR NOT L AND M AND S

Or

One mark per mark point, max two with some simplification from the problem

MP3 NOT L AND


MP4 (M OR S OR (M AND S))

Or

One mark per mark point, max two with more simplification from the problem

MP5 NOT L AND


MP6 (M OR S)

Example answers:

(A =) NOT L AND (M OR S) OR NOT L AND M AND S //


(A =) NOT L AND (M OR S OR (M AND S)) //
(A =) NOT L AND (M OR S)

© Cambridge University Press & Assessment 2025 Page 16 of 23


0478/23 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

7(b)(ii) Four marks for eight correct outputs 4


Three marks for six or seven correct outputs
Two marks for four or five correct outputs
One mark for two or three correct outputs

L M S A

0 0 0 0

0 0 1 1

0 1 0 1

0 1 1 1

1 0 0 0

1 0 1 0

1 1 0 0

1 1 1 0

© Cambridge University Press & Assessment 2025 Page 17 of 23


0478/23 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

8 Marks are available for: 15

• AO2 (maximum 9 marks)


• AO3 (maximum 6 marks)

Data Structures required with names as given in the scenario:

Arrays or lists Video[], Results[]

Requirements (techniques)

R1 initialises arrays, displays menu and allows choice, then proceeds based on valid choice, (nested iteration, input,
output, selection, validation).
R2 enters data and stores into array at first available location. The code allows for additional data to be input, as required.
(counting, selection, input, storage, iteration if selected).
R3 finds specific data based on user input and outputs results. Appropriate output messages, including if video not found.
Program continues until stopped by user.
(input, output, linear search, iteration).

© Cambridge University Press & Assessment 2025 Page 18 of 23


0478/23 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks

Example 15-mark answer in pseudocode

//Array and variable declarations not required in responses


//Initialisation of Video array
FOR Index1  1 TO 10000
FOR Index2  1 TO 4
Video[Index1, Index2]  ""
Next Index2
NEXT Index1
//Display of menu choices
REPEAT
OUTPUT "Enter 1 to input data for a new video, 2 to search for a video title, or 3 to stop"
//Input menu choice with validation of input
REPEAT
INPUT Answer
IF Answer <> 1 AND Answer <> 2 AND Answer <> 3
THEN
OUTPUT "You must input 1, 2 or 3, please try again"
ENDIF
UNTIL Answer = 1 OR Answer = 2 OR Answer = 3
//User chooses to input data for a new video title
IF Answer = 1
THEN
Store  1
//Finding the next available space in the array
REPEAT
IF Video[Store, 1] <> ""
THEN
Store  Store + 1
ENDIF
UNTIL Video[Store, 1] = ""
//Data entry and storage until user says no more needed
REPEAT
OUTPUT "Enter the title"
INPUT Video[Store, 1]
OUTPUT "Enter the format (4K for 4K, BD for Blu-ray, DV for DVD, DG for Digital"
INPUT Video[Store, 2]
OUTPUT "Enter the year of release"
INPUT Video[Store, 3]

© Cambridge University Press & Assessment 2025 Page 19 of 23


0478/23 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks
OUTPUT "Enter the storage code"
INPUT Video[Store, 4]
Store  Store + 1
OUTPUT "Another video (Y or N)?"
INPUT Another
UNTIL Another = 'N' OR Another = 'n'
ENDIF
//User chooses to search for a video title
IF Answer = 2
THEN
REPEAT
//Initialisation of Results array
FOR Index1  1 TO 20
FOR Index2  1 TO 4
Results[Index1, Index2]  ""
NEXT Index2
NEXT Index1
//User inputs their search criterion
OUTPUT "State the title of the video you want"
INPUT Title
Search  1
Store  1
//Searching for the title
REPEAT
//If found, data copied to Results array
IF Video[Search, 1] = Title
THEN
FOR Index1  1 TO 4
Results[Store, Index1]  Video[Search, Index1]
NEXT Index1
//Search and Store indexes incremented
Search  Search + 1
Store  Store + 1
ELSE
//Search index incremented
Search  Search + 1
ENDIF

© Cambridge University Press & Assessment 2025 Page 20 of 23


0478/23 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
Question Answer Marks
//Search ends when no more data in Video array,
//or end of Video array reached.
UNTIL Video[Search, 1] = "" OR Search = 10000
//Outputting only results found from Results array
IF Results[1, 1] <> ""
THEN
OUTPUT "The results: "
FOR Index1  1 TO Store – 1
FOR Index2  1 TO 4
OUTPUT Results[Index1, Index2]
NEXT Index2
NEXT Index1
ELSE
//Feedback to user if item not found
OUTPUT "Item not found"
ENDIF
//Another search offered
OUTPUT "Another search (Y or N)?"
INPUT Another
UNTIL Another = 'N' OR Another = 'n'
ENDIF
UNTIL Answer = 3

© Cambridge University Press & Assessment 2025 Page 21 of 23


0478/23 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED

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

No creditable At least one programming technique Some programming techniques used The range of programming techniques
response. has been used. are appropriate to the problem. used is appropriate to the problem.
Any use of selection, iteration, More than one technique seen applied All criteria stated for the scenario have
counting, totalling, input and output. to the scenario, check the list of been covered by the use of appropriate
techniques needed. programming techniques, check the list of
techniques needed.

Some data has been stored but not Some of the data structures chosen The data structures chosen are
appropriately. are appropriate and store some of the appropriate and store all the data
Any use of variables or arrays or other data required. required.
language dependent data structures More than one data structure used to The data structures used store all the
e.g. Python lists. store data required by the scenario. data required by the scenario.

© Cambridge University Press & Assessment 2025 Page 22 of 23


0478/23 Cambridge IGCSE – Mark Scheme May/June 2025
PUBLISHED
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

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 The program is in a logical order.
be 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
with errors that attempt to perform a some errors that logically perform syntax errors.
task given in the scenario. tasks given in the scenario. Ignore
minor syntax errors.

The solution attempts at least one of The solution attempts to meet most of The solution meets all the requirements
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 the attempts most tasks given in the the scenario.
scenario. scenario.

© Cambridge University Press & Assessment 2025 Page 23 of 23


Cambridge IGCSE™

COMPUTER SCIENCE 0478/22


Paper 2 Algorithms, Programming and Logic February/March 2024
MARK SCHEME
Maximum Mark: 75

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.

This document consists of 16 printed pages.

© Cambridge University Press & Assessment 2024 [Turn over


0478/22 Cambridge IGCSE – Mark Scheme February/March 2024
PUBLISHED
Generic Marking Principles

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.

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 assess ed 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.

© Cambridge University Press & Assessment 2024 Page 2 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2024
PUBLISHED
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 fu ll 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 thre sholds or
grade descriptors in mind.

Mark scheme abbreviations

/ separates alternative words / phrases within a marking point


// separates alternative answers within a marking point
underline actual word given must be used by candidate (grammatical variants accepted)
max indicates the maximum number of marks that can be awarded
( ) the word / phrase in brackets is not required, but sets the context

Note: No marks are awarded for using brand names of software packages or hardware.

© Cambridge University Press & Assessment 2024 Page 3 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2024
PUBLISHED
Question Answer Marks

1 B 1

Question Answer Marks

2(a) One mark for each correct line from the test data type the description 4

Test data type Description

a value that is accepted


abnormal

a value that is the highest or lowest value to be accepted and


the corresponding lowest or highest value to be rejected
boundary

a value that is the highest or lowest value to be rejected

extreme
a value that is rejected

normal
a value that is the highest or lowest value to be accepted

2(b) One mark for each point: 4


• Abnormal for example 31
• Boundary 4, 5 // 10, 11
• Extreme 5 // 10
• Normal for example 6

© Cambridge University Press & Assessment 2024 Page 4 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2024
PUBLISHED
Question Answer Marks

3(a) One mark for each point max four. 4


• input value, outside loop
• correct use of loop
• checking value input against contents of array …
• ... appropriate action
• correct outputs

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

© Cambridge University Press & Assessment 2024 Page 5 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2024
PUBLISHED
Question Answer Marks

3(b) One mark for each point max four. 4


• use of inner and outer loop
• correct use of loops
• checking adjacent values in array …
• ... swap if required
• correct stopping condition

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

Question Answer Marks

4 One mark for each point max three. 3


• Integer
• real
• char
• string
• Boolean

© Cambridge University Press & Assessment 2024 Page 6 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2024
PUBLISHED
Question Answer Marks

5(a) One mark for each error identified and correction 3


• Line 05 OUTPUT should be INPUT
• Line 06 OR should be AND
• Line 10 NEXT should be ENDIF

5(b)(i) One mark for checking for < 0 or >= 0 3


One mark for checking of both inputs
One mark for correct repetition of both inputs e.g. use of REPEAT WHILE or using existing loop, in separate loops or both
in a single loop

Example:

REPEAT
OUTPUT "Enter cost price "
INPUT Cost
UNTIL Cost >= 0
REPEAT
OUTPUT "Enter selling price "
INPUT Sell
UNTIL Sell >= 0

or

OUTPUT "Enter cost price "


INPUT Cost
WHILE Cost < 0
OUTPUT "Enter cost price "
INPUT Cost
ENDWHILE
OUTPUT "Enter selling price "
INPUT Sell
WHILE Sell < 0
OUTPUT "Enter selling price "
INPUT Sell
ENDWHILE

© Cambridge University Press & Assessment 2024 Page 7 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2024
PUBLISHED
Question Answer Marks

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)

Question Answer Marks

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)

Question Answer Marks

7(a) One mark for each correct gate, with the correct input(s) as shown. 4

© Cambridge University Press & Assessment 2024 Page 8 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2024
PUBLISHED
Question Answer Marks

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

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

© Cambridge University Press & Assessment 2024 Page 9 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2024
PUBLISHED
Question Answer Marks

8 One mark for each column Total, Average and OUTPUT 4


One mark for columns NumberGroups and GroupSize

NumberGroups Total GroupSize Average OUTPUT

0 0

1 7 7

2 17 10

3 19 2

4 27 8

5 30 3

6 39 9

0 6 Average group size 6

Question Answer Marks

9(a)(i) StorageID 1

9(a)(ii) It is a unique identifier 1

© Cambridge University Press & Assessment 2024 Page 10 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2024
PUBLISHED
Question Answer Marks

9(b) One mark for every two correct data types 2

Field Data type

SizeMetres Real/Integer

Position Char/Integer/Text/Alphanumeric

Hoist Boolean/Text/Alphanumeric

StorageID Text/Alphanumeric

9(c) One mark if two correct or two marks if completely correct 4


SELECT StorageID, PriceMonth, SizeMetres

One mark each point max two


FROM StorageUnits
WHERE Hoist = TRUE;

© Cambridge University Press & Assessment 2024 Page 11 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2024
PUBLISHED
Question Answer Marks

10 One mark for each technique 6


One mark for a matching description
max six
• use comments …
• … to explain the purpose of each section of code
• …for example, logic / syntax

• use meaningful identifier names to …


• … clearly identify the purpose
• … of variables, constants, arrays, procedures etc
• … by example

• use procedures and functions …


• … to avoid repeated code
• … simplify logic

• use indentation and white space …


• … to make the program readable

© Cambridge University Press & Assessment 2024 Page 12 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2024
PUBLISHED
Question Answer Marks

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, [Link] 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)

Data structures required with names as given in the scenario:


Arrays or lists StudentName, ScreenTime
Variable ClassSize could be constant

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)

© Cambridge University Press & Assessment 2024 Page 13 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2024
PUBLISHED
Question Answer Marks

11 Example 15-mark answer in pseudocode

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]

© Cambridge University Press & Assessment 2024 Page 14 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2024
PUBLISHED
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

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.

© Cambridge University Press & Assessment 2024 Page 15 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2024
PUBLISHED
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

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.

© Cambridge University Press & Assessment 2024 Page 16 of 16


Cambridge IGCSE™

COMPUTER SCIENCE 0478/21


Paper 2 Algorithms, Programming and Logic May/June 2024
MARK SCHEME
Maximum Mark: 75

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.

This document consists of 18 printed pages.

© Cambridge University Press & Assessment 2024 [Turn over


0478/21 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
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 descriptions 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.

© Cambridge University Press & Assessment 2024 Page 2 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
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.

Mark scheme abbreviations

/ separates alternative words / phrases within a marking point


// separates alternative answers within a marking point
underline actual word given must be used by candidate (grammatical variants accepted)
max indicates the maximum number of marks that can be awarded
( ) the word / phrase in brackets is not required, but sets the context

Note: No marks are awarded for using brand names of software packages or hardware.

© Cambridge University Press & Assessment 2024 Page 3 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

1 D 1

Question Answer Marks

2(a) One mark for each correct line 4

Description Programming concept

a subroutine that may not return a value function

procedure
a value that is declared and used within
a specific procedure
parameter
a value that a procedure expects you to
supply when it is called global variable

a subroutine that will always return a local variable


value

2(b) One mark per mark point 2


 Correct key word - CALL
 Procedure name with correct parameters - Average(25, 50)

CALL Average(25, 50)

© Cambridge University Press & Assessment 2024 Page 4 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

2(c) One mark per mark point, max three 3


 Procedures / functions divide the program into smaller manageable segments
 … making it more readable / easier to understand / easier to debug
 Procedures / functions with meaningful names help to provide documentation for the program / enable/help/provide
abstraction
 Procedures and functions may be re-used (in the program / in other programs / as part of a library) / run from a single
line
 Procedures and functions can reduce / eliminate (repeated) code

Question Answer Marks

3 One mark for a correct statement about each data type … 4


… one mark for a correct example of data for each data type.

Example answer

Integer A whole number [1]


Example 27 [1]

Real A number that contains a fractional part [1] …


Example 18.75 [1]

© Cambridge University Press & Assessment 2024 Page 5 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

4(a) One mark per mark point 4


 Line 01 / DECLARE Loop : STRING
should be DECLARE Loop : INTEGER

 Line 07 / IF Loop  1 TO Limit


should be FOR Loop  1 TO Limit

 Line 09 / INPUT Loop


should be INPUT Value

 Line 10 / Total  Total * Value


should be Total  Total + Value

Correct algorithm:

01 DECLARE Loop : INTEGER


02 DECLARE Limit : INTEGER
03 DECLARE Value : REAL
04 DECLARE Total : REAL
05 Total  0
06 Limit  ROUND(RANDOM() * 19,0) + 1
07 FOR Loop  1 TO Limit
08 OUTPUT "Enter a number"
09 INPUT Value
10 Total  Total + Value
11 NEXT Loop
12 OUTPUT "The total of the numbers entered is ", Total
13 OUTPUT "The average number entered is ", Total / Limit

© Cambridge University Press & Assessment 2024 Page 6 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

4(b) One mark per mark point 2


 Correct use of ROUND with 2 arguments separated by comma, for example ROUND( 5, 2) (in statement 13) …
 … (Total / Limit,1) correct arguments

For example:

OUTPUT "The average of the numbers entered is ",


ROUND(Total / Limit,1)

4(c) One mark per mark point, max four 4


 After line 09 / after the input
 Insert a WHILE / pre-condition loop…
 … to check if the value entered is between 1 and 500 inclusive
 If the value is not in range, output an error message
 … and insert another input statement for re-input.

Or

 Before line 08 / before the input message


 start a REPEAT / post-condition loop
 After line 09 / after the input
 … close the REPEAT loop by checking if the value entered was between 1 and 500 inclusive
 If it wasn’t, (the loop will repeat) for the number to be re-input / If it was, the program continues.

© Cambridge University Press & Assessment 2024 Page 7 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

5 One mark per mark point 5


MP1 Correct input statement with appropriate variable
MP2 Elements of selection statement present – CASE OF ENDCASE
MP3 At least one correct branch in the case statement
MP4 All branches from 1 to 4 correct
MP5 Correct use of OTHERWISE with correct output.

For example:

INPUT Number
CASE OF Number
1 : OUTPUT Number
2 : OUTPUT Number
3 : OUTPUT Number
4 : OUTPUT Number
OTHERWISE OUTPUT "ERROR"
ENDCASE

Or

INPUT Number
CASE OF Number
1 : OUTPUT 1
2 : OUTPUT 2
3 : OUTPUT 3
4 : OUTPUT 4
OTHERWISE OUTPUT "ERROR"
ENDCASE

© Cambridge University Press & Assessment 2024 Page 8 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

6(a) One mark per mark point 7


MP1 Correct Limit column
MP2 Correct Count column
MP3 Array columns for input stage
MP4 Array columns for sort stage
MP5 Correct Flag column
MP6 Correct Swap column
MP7 Correct Result and OUTPUT columns

Numbers
Limit Count [1] [2] [3] [4] [5] [6] [7] Flag Swap Result OUTPUT
7 1 47
2 50

3 52
4 60
5 80
6 63
7 70
8 TRUE
1 FALSE
2
3
4

© Cambridge University Press & Assessment 2024 Page 9 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

6(a) Numbers

Limit Count [1] [2] [3] [4] [5] [6] [7] Flag Swap Result OUTPUT

5 80

63 80 TRUE

6 80

70 80 TRUE

1 FALSE

4 60

6(b) One mark per mark point 3


 A set of numbers is input / stored in an array
 The numbers are sorted / Bubble sort into (ascending) order
 The middle / median value is found / output

© Cambridge University Press & Assessment 2024 Page 10 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

7(a) One mark per mark point, max two 2


 Data stored in a file gives a permanent copy / prevents the data from being lost
 … so it can be recalled / used again in a program / in another program
 can be stored elsewhere / transferred to another computer

7(b) One mark per mark point, max four 4


MP1 Declaration of a string variable
MP2 Correct use of OPENFILE keywords for reading
MP3 Correct use READFILE with string variable
MP4 Correct use of UCASE and LENGTH functions and output of each
MP5 Correct use of CLOSEFILE

Example:

DECLARE Words : STRING


OPENFILE [Link] FOR READ
READFILE [Link], Words
OUTPUT UCASE(Words), LENGTH(Words)
CLOSEFILE [Link]

© Cambridge University Press & Assessment 2024 Page 11 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

8(a) One mark for each correct gate, with the correct input(s) as shown. 5

S Z

© Cambridge University Press & Assessment 2024 Page 12 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

8(b) Four marks for eight correct outputs. 4


Three marks for six or seven correct outputs.
Two marks for four or five correct outputs.
One mark for two or three correct outputs

R S T Z

0 0 0 1

0 0 1 1

0 1 0 1

0 1 1 0

1 0 0 1

1 0 1 0

1 1 0 1

1 1 1 1

© Cambridge University Press & Assessment 2024 Page 13 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

9(a) One mark for an appropriate reason if no has been stated, for example: 1
None of the fields are likely to contain unique data.

9(b) One mark for each correct answer 5

SUM
NumberInStock
SoftDrinks
Container
'Can'

Correct code:

SELECT SUM (NumberInStock)


FROM SoftDrinks
WHERE Container = 'Can';

10 Data structures required: 15

The names underlined must match those given in the scenario:

Arrays or lists Clubs[], Statistics[], Points[], TieIndex[]

Variables Matches, Won, Drawn, Lost, Counter, Maximum, TieCheck, OutLoop, Max, Count

Requirements (techniques):

R1 Input and store number of matches, cricket club names, number of matches won, drawn and lost. Validation of number
of matches played and matches won, lost and drawn against number of matches played (with prompts, iteration,
storing data in variables, validation, 1D and 2D arrays).
R2 Calculate and store the number of points for each cricket club. Finding the index of the array with the highest score /
highest score (calculation, finding the maximum, iteration).
R3 Identifying cricket clubs with highest number of points and whether there is a tie for the top position. Output with
appropriate messages (iteration, selection and output).

© Cambridge University Press & Assessment 2024 Page 14 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

10 Example 15-mark answer in pseudocode

// meaningful identifiers and appropriate data structures


// similar variables grouped to save space as in HL languages
DECLARE Clubs : ARRAY[1:12] OF STRING
DECLARE Statistics : ARRAY[1:12, 1:3] OF INTEGER
DECLARE Points : ARRAY[1 : 12] OF INTEGER
DECLARE TieIndex : ARRAY[1 : 12] OF INTEGER
DECLARE Matches, Won, Drawn, Lost : INTEGER
DECLARE Counter, Maximum, TieCheck, OutLoop : INTEGER
DECLARE Max, Count : INTEGER
// input number of matches
REPEAT
OUTPUT "How many matches have been played (Maximum 22)? "
INPUT Matches
UNTIL Matches <= 22
// input of data as a single loop – multiple loops for data entry
// is also acceptable.
FOR Counter  1 TO 12
OUTPUT "Enter the name of the cricket club"
INPUT Clubs[Counter]
// input of match results with validation
REPEAT
OUTPUT "Enter the number of matches won, drawn and lost for ", Clubs[Counter]
INPUT Won, Drawn, Lost
IF Won + Drawn + Lost <> Matches
THEN
OUTPUT "Your inputs must total ", Matches, " please try again"
ENDIF
UNTIL Matches = Won + Drawn + Lost
Statistics[Counter, 1]  Won
Statistics[Counter, 2]  Drawn
Statistics[Counter, 3]  Lost
// calculating and storing points

© Cambridge University Press & Assessment 2024 Page 15 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

10 Points[Counter]  Statistics[Counter, 1] * 12 + Statistics[Counter, 2] * 5


NEXT Counter
// finding the highest points
Max  -100
FOR Maximum  1 TO 12
IF Points[Maximum] > Max
THEN
Max  Points[Maximum]
ENDIF
NEXT Maximum
// finding the winner(s)
Count  0
FOR TieCheck  1 TO 12
IF Points[TieCheck] = Max
THEN
Count  Count + 1
TieIndex[Count]  TieCheck
ENDIF
Next TieCheck
// outputting the results
FOR OutLoop  1 TO Count
OUTPUT "Winning Club(s): ", Clubs[TieIndex[OutLoop]]
OUTPUT "Number of wins: ", Statistics[TieIndex[OutLoop], 1]
Next OutLoop
OUTPUT "Winning Points: ", Max

© Cambridge University Press & Assessment 2024 Page 16 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
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

No creditable At least one programming technique Some programming techniques used The range of programming
response. has been used. are appropriate to the problem. techniques used is appropriate to the
Any use of selection, iteration, More than one technique seen problem.
counting, totalling, input and output. applied to the scenario, check the list All criteria stated for the scenario
of techniques needed. have been covered by the use of
appropriate programming techniques,
check the list of techniques needed.

Some data has been stored but not Some of the data structures chosen The data structures chosen are
appropriately. are appropriate and store some of the appropriate and store all the data
Any use of variables or arrays or data 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.

© Cambridge University Press & Assessment 2024 Page 17 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
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

No creditable Program seen without relevant Program seen with some relevant The program has been fully
response. comments. comment(s). commented.

Some identifier names used are The majority of identifiers used are Suitable identifiers with names
appropriate. appropriately named. meaningful to their purpose have
Some of the data structures used Most of the data structures used have been 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 The program is in a logical order.
be illogical.

The solution is inaccurate in many The solution contains parts that are The solution is accurate.
places. inaccurate. Solution logically performs all the
Solution contains few lines of code Solution contains lines of code with tasks given in the scenario. Ignore
with errors that attempt to perform a some errors that logically perform minor syntax errors.
task given in the scenario. tasks given in the scenario. Ignore
minor syntax errors.

The solution attempts at least one of The solution meets most of the The solution meets all the
the requirements. requirements. requirements given in the question.
Solution contains lines of code that Solution contains lines of code that Solution performs all the tasks given
attempt at least one task given in the perform most tasks given in the in the scenario.
scenario. scenario.

© Cambridge University Press & Assessment 2024 Page 18 of 18


Cambridge IGCSE™

COMPUTER SCIENCE 0478/22


Paper 2 Algorithms, Programming and Logic May/June 2024
MARK SCHEME
Maximum Mark: 75

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.

This document consists of 16 printed pages.

© Cambridge University Press & Assessment 2024 [Turn over


0478/22 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
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 descriptions 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.

© Cambridge University Press & Assessment 2024 Page 2 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
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.

Mark scheme abbreviations

/ separates alternative words / phrases within a marking point


// separates alternative answers within a marking point
underline actual word given must be used by candidate (grammatical variants accepted)
max indicates the maximum number of marks that can be awarded
( ) the word / phrase in brackets is not required, but sets the context

Note: No marks are awarded for using brand names of software packages or hardware.

© Cambridge University Press & Assessment 2024 Page 3 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

1 C 1

Question Answer Marks

2 One mark for each correct line 4


Logic function Standard symbol

AND

XOR

NAND

OR

© Cambridge University Press & Assessment 2024 Page 4 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

3 One mark for each correct answer max three 3


MP1 abstraction
MP2 decomposition
MP3 identification of problem
MP4 identification of requirements // outline of success criteria

Question Answer Marks

4(a) One mark per mark point 6


MP1 length check …
MP2 … to ensure the product code entered is 6 characters in length
MP3 format check …
MP4 … to ensure the first two characters of the product code entered are “PD”
MP5 range check …
MP6 … to ensure that the value of the last four figures of the product code entered is between 1000 and 9999

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"

© Cambridge University Press & Assessment 2024 Page 5 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

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)

Question Answer Marks

6(a) One mark for: 4


MP1 adding current value to total

One mark for each point max three.


MP2 input more than one number
MP3 setting total to zero before loop
MP4 correct use of loop including terminal condition
MP5 output total after loop

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

© Cambridge University Press & Assessment 2024 Page 6 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

6(b) One mark for each point 4


MP1 adding one to counter
MP2 correct use of selection, if current value > 100 THEN … ENDIF

One mark for each point, max two


MP3 input more than one number
MP4 setting counter to zero before loop
MP5 correct use of loop including terminal condition
MP6 output value of counter after loop

Example:
Counter  0
INPUT Value
WHILE Value <> 9999.9
IF Value > 100
THEN
Counter  Counter + 1
ENDIF
INPUT Value
ENDWHILE
OUTPUT Counter

Question Answer Marks

7(a) 01//02//06//10 3
04(07) and/or 08
03(12)

© Cambridge University Press & Assessment 2024 Page 7 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

7(b) One mark for each error identified and corrected 3


Line 04 < should be >
Line 08 Count should be Counter
Line 11 ENDWHILE should be ENDIF

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

Question Answer Marks

8(a) X= 1 mark 3
(A AND B) // A AND B 1 mark
AND NOT C 1 mark

X = (A AND B) AND NOT C

© Cambridge University Press & Assessment 2024 Page 8 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

8(b) Four marks for 8 correct outputs 4


Three marks for 6/7 correct outputs
Two marks for 4/5 correct outputs
One mark for 2/3 correct outputs

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

© Cambridge University Press & Assessment 2024 Page 9 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

9(a) One mark for each of columns A, B and T 5


Two marks for columns List[1] to List[5] all entries correct or
One mark for columns List[1] to List[5] with one error

A B List[1] List[2] List[3] List[4] List[5] T


15 17 20 5 9
FALSE 1 17 15 15
TRUE 2 20 15 15
TRUE 3
TRUE 4 9 5 5
5
FALSE 1 20 17 17
TRUE 2
3
4
5
FALSE 1
2
3
4
5

© Cambridge University Press & Assessment 2024 Page 10 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

9(b) One mark for each point 2


MP1 (bubble) sort data in array
MP2 in descending order

Question Answer Marks

10(a) ContractNumber 1

10(b) One mark for every two correct data types 2

Field Data type

ContractNumber text/alphanumeric

Months integer

EndDate date/time

Sport Boolean

10(c) One mark for each point 3


MP1 to find the total number of months for all contracts
MP2 to find the number of contracts
MP3 … that are subscribed to News

10(d) ContractNumber 2
News AND Sport // Sport AND News

Example answer:
SELECT ContractNumber
FROM Contract
WHERE News // News = TRUE AND Sport // Sport = TRUE ;

© Cambridge University Press & Assessment 2024 Page 11 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

11 Data Structures required with names as given in the scenario: 15


Arrays or lists Grid

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).

Example 15-mark answer in pseudocode


// Set up game
FOR Row  1 TO 5
FOR Column  1 TO 5
Grid[Row, Column]  ''// set grid cells to be empty
NEXT Column
NEXT Row

© Cambridge University Press & Assessment 2024 Page 12 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

11 REPEAT // not in cell 1,1


XRow  ROUND ((RANDOM() * 4) + 1, 0) // Random row position between 1 and 5 in GRID
XColumn  ROUND ((RANDOM() * 4) + 1, 0) // Random column position between 1 and 5 in
GRID
UNTIL XRow <> 1 and XColumn <> 1 // not in cell 1,1

Grid [XRow, XColumn]  'X'


MaxMove  10
NumberMoves  0
PlayerRow  1
PlayerColumn  1
Win  FALSE

// 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

// check for out-of-range moves


IF TempColumn < 1 or TempColumn > 5
THEN
MoveError  TRUE
ELSE
PlayerColumn  TempColumn
ENDIF

© Cambridge University Press & Assessment 2024 Page 13 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

11 IF TempRow < 1 or TempRow > 5


THEN
MoveError  TRUE
ELSE
PlayerRow  TempRow
ENDIF

// check win if X Found


IF Grid [PlayerRow, PlayerColumn] = 'X'
THEN
OUTPUT "You Win"
Win  TRUE
ELSE
IF NOT MoveError
THEN
NumberMoves  NumberMoves + 1
ENDIF
ENDIF
UNTIL NOT MoveError
ENDWHILE

IF NOT Win
THEN
OUTPUT "You Lose"
ENDIF

© Cambridge University Press & Assessment 2024 Page 14 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
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

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.

© Cambridge University Press & Assessment 2024 Page 15 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
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

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.

© Cambridge University Press & Assessment 2024 Page 16 of 16


Cambridge IGCSE™

COMPUTER SCIENCE 0478/23


Paper 2 Algorithms, Programming and Logic May/June 2024
MARK SCHEME
Maximum Mark: 75

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.

This document consists of 18 printed pages.

© Cambridge University Press & Assessment 2024 [Turn over


0478/23 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
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 descriptions 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.

© Cambridge University Press & Assessment 2024 Page 2 of 18


0478/23 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
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.

Mark scheme abbreviations

/ separates alternative words / phrases within a marking point


// separates alternative answers within a marking point
underline actual word given must be used by candidate (grammatical variants accepted)
max indicates the maximum number of marks that can be awarded
( ) the word / phrase in brackets is not required, but sets the context

Note: No marks are awarded for using brand names of software packages or hardware.

© Cambridge University Press & Assessment 2024 Page 3 of 18


0478/23 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

1 A 1

Question Answer Marks

2(a) One mark for each correct line 4


Logic gate symbol Logic function

AND

XOR

NOT

NAND

OR

© Cambridge University Press & Assessment 2024 Page 4 of 18


0478/23 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

2(b) 4
A B C Z

0 0 0 0

0 0 1 1

0 1 0 0

0 1 1 0

1 0 0 1

1 0 1 0

1 1 0 0

1 1 1 0

Four marks for eight correct outputs.


Three marks for six or seven correct outputs.
Two marks for four or five correct outputs.
One mark for two or three correct outputs

Question Answer Marks

3 One mark for a correct statement about each data type and one mark for a correct example of data for each data type. 4

For example:

String A group of characters consisting of letters, numbers and special characters [1], Cambridge2024 [1]

Char A single character [1] X [1]

© Cambridge University Press & Assessment 2024 Page 5 of 18


0478/23 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

4(a) One mark per mark point, max four 4

 Line 01 / DECLARE People : ARRAY[1:50, 1:3] OF REAL


should be DECLARE People : ARRAY[1:50, 1:3] OF STRING
 Line 10 / Count  100
should be Count  1
 Line 12 / CASE OF
should be REPEAT
 Line 27 / UNTIL NOT Count
should be UNTIL NOT Continue // UNTIL Continue = FALSE

Correct algorithm:

01 DECLARE People : ARRAY[1:50, 1:3] OF STRING


02 DECLARE Count : INTEGER
03 DECLARE Response : CHAR
04 DECLARE Continue : BOOLEAN
05 FOR I  1 TO 50
06 FOR J  1 TO 3
07 People[I, J]  ""
08 NEXT J
09 NEXT I
10 Count  1
11 Continue  TRUE
12 REPEAT
13 OUTPUT "Enter the last name"
14 INPUT People[Count, 1]
15 OUTPUT "Enter the first name"
16 INPUT People[Count, 2]
17 OUTPUT "Enter the city"
18 INPUT People[Count, 3]
19 OUTPUT "Do you want to enter another name (Y or N)?"
20 INPUT Response

© Cambridge University Press & Assessment 2024 Page 6 of 18


0478/23 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

4(a) 21 IF Response = 'N'


22 THEN
23 Continue  FALSE
24 ELSE
25 Count  Count + 1
26 ENDIF
27 UNTIL NOT Continue // UNTIL Response = 'N'

4(b)  Use of appropriate loop 4


 Method to check array maximum not exceeded
 Method to check current / next array element not empty
 Output of all three array elements per array row (and no more)

Example algorithm:

Count  1
WHILE Count <= 50 AND People[Count, 1] <> "" DO
OUTPUT People[Count, 1]
OUTPUT People[Count, 2]
OUTPUT People[Count, 3]
Count  Count + 1
ENDWHILE

4(c) One mark per mark point, max four 4

MP1 Declare/use a variable that is set to the maximum size of the array
MP2 … at the start of the program
MP3 After line 18
MP4 … check that the value of the counting variable is not greater than the array maximum variable
MP5 … and if it is do not allow any more entries / set the value of Response to 'N' / add additional condition to UNTIL
statement that checks if the counting variable is at maximum

© Cambridge University Press & Assessment 2024 Page 7 of 18


0478/23 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

5(a) MP1 Correct L column 6


MP2 Correct S column
MP3 Correct T column
MP4 Correct A column
MP5 Correct Limit, Count and Value columns
MP6 Correct OUTPUT columns

L S T A Limit Count Value OUTPUT

0 10000 0 0 10 1 30

30 30 2 18

18 48 3 8

8 56 4 25

81 5 12

93 6 17

110 7 2

2 112 8 50

50 162 9 15

177 10 5

182 18.2 11 L = 50 S = 2
T = 182 A = 18.2

5(b) One mark per mark point, max two 2


 Any two from finds / outputs the largest, smallest, total and average of a set of numbers
 All four of finds / outputs the largest, smallest, total and average of a set of numbers

© Cambridge University Press & Assessment 2024 Page 8 of 18


0478/23 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

5(c)  (The identifiers L, S, T and A) are single letters 3


 … so do not give any indication of what values they hold.
 For programs to be maintainable, identifiers should have meaningful names.

5(d) One mark for every two appropriate identifiers, max two 2

Original identifier Improved identifier

L Largest / Maximum

S Smallest / Minimum

T Total / Sum

A Average / Mean

© Cambridge University Press & Assessment 2024 Page 9 of 18


0478/23 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

6(a) One mark for each appropriate piece of test data for a range of 1 to 80 inclusive 3

Example:

Normal 75
Abnormal 101
Extreme 80

6(b) Test data to test the limits of acceptable data entry 2


… that will only accept the largest and smallest acceptable values.

© Cambridge University Press & Assessment 2024 Page 10 of 18


0478/23 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

7(a) One mark per mark point 4

MP1 Assignment of given string to FullText


MP2 Correct use of SUBSTRING and assignment of reduced string to own variable
MP3 Correct use of UCASE
MP4 Output of both strings

Example:

FullText  "IGCSE Computer Science at Cambridge"


PartText  SUBSTRING(FullText, 7, 16)
OUTPUT PartText, UCASE(FullText)

7(b) One mark per mark point 3

MP1 Opening the correct text file for writing


MP2 Writing the variable from part (a) to the file
MP3 Closing the text file after writing

Example:

OPENFILE "[Link]" FOR WRITE


WRITEFILE "[Link]", PartText
CLOSEFILE "[Link]"

Question Answer Marks

8(a) Fields – 6 2
Records – 11

© Cambridge University Press & Assessment 2024 Page 11 of 18


0478/23 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

8(b) MP1 Correct models of planes selected 4


MP2 Correct Years of planes selected
MP3 Correct numbers of engines selected with data all matching for each record
MP4 Data sorted correctly with no additional fields or punctuation

Correct output:

314 Clipper 1936 4


C-47 Dakota 1942 2
Nimrod 1966 4
DC-10 1970 3
Concorde 1973 4

8(c) MP1 Correct additional keywords used – FROM, WHERE 4


MP2 Correct SELECT field – Model with no additional fields
MP3 Correct table name - Hangar1
MP4 Correct search criteria - Airworthy = Y // Airworthy

Correct code:

SELECT ID, Model


FROM Hangar1
WHERE Airworthy = Y;// Airworthy;

© Cambridge University Press & Assessment 2024 Page 12 of 18


0478/23 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

9  AO2 (maximum 9 marks) 15


 AO3 (maximum 6 marks)

Data Structures required with names as given in the scenario:

Arrays or lists Teams[], Results[]


Variables Played

Requirements (techniques):

R1 Input and store number of games played, teams, number of games won, drawn and lost, with validation for input of
numbers (iteration, range check, input, output).
R2 Calculate and store the number of points. Sort the arrays by number of points (calculation, sort, (nested) iteration).
R3 Finding and outputting top team(s) (finding max, counting and output).

© Cambridge University Press & Assessment 2024 Page 13 of 18


0478/23 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

9 Example 15-mark answer in pseudocode

// input number of games


REPEAT
OUTPUT "How many games have been played (Maximum 18)? "
INPUT Played
UNTIL Played <=18
// input of data as a single loop – a loop for the teams and
// another loop for the data is also acceptable.
FOR InLoop  1 TO 10
OUTPUT "Enter the name of the team"
INPUT Teams[InLoop]
// input of games results with validation
REPEAT
OUTPUT "Enter the number of games won, drawn and lost for ", Teams[InLoop]
INPUT Won, Drawn, Lost
IF Won + Drawn + Lost <> Played
THEN
OUTPUT "Your inputs must total ", Played, " please try again"
ENDIF
UNTIL Played = Won + Drawn + Lost
Results[InLoop, 1]  Won
Results[InLoop, 2]  Drawn
Results[InLoop, 3]  Lost
// calculating and storing points
Results[InLoop, 4]  Results[InLoop, 1] * 3 + Results[InLoop, 2]
NEXT InLoop
// sorting section
Flag  TRUE
WHILE Flag DO
Flag  FALSE
FOR Sort  1 TO 9
IF Results[Sort, 4] < Results[Sort + 1, 4]
THEN

© Cambridge University Press & Assessment 2024 Page 14 of 18


0478/23 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

9 // swapping if points not higher then next element


TempString  Teams[Sort]
Temp1  Results[Sort, 1]
Temp2  Results[Sort, 2]
Temp3  Results[Sort, 3]
Temp4  Results[Sort, 4]
Teams[Sort]  Teams[Sort + 1, 1]
Results[Sort, 1]  Results[Sort + 1, 1]
Results[Sort, 2]  Results[Sort + 1, 2]
Results[Sort, 3]  Results[Sort + 1, 3]
Results[Sort, 4]  Results[Sort + 1, 4]
Teams[Sort + 1]  TempString
Results[Sort + 1, 1]  Temp1
Results[Sort + 1, 2]  Temp2
Results[Sort + 1, 3]  Temp3
Results[Sort + 1, 4]  Temp4
Flag  TRUE
ENDIF
NEXT Sort
ENDWHILE
// checking for tie
Count  1
Finish  FALSE
REPEAT
IF Results[Count, 4] = Results[Count + 1, 4]
THEN
Count  Count + 1
ELSE
Finish  TRUE
ENDIF
UNTIL Finish

© Cambridge University Press & Assessment 2024 Page 15 of 18


0478/23 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
Question Answer Marks

9 // outputting the results


FOR OutLoop  1 TO Count
OUTPUT "Winning Team(s): ", Teams[OutLoop]
NEXT OutLoop
OUTPUT "Winning Points: ", Results[1, 4]

© Cambridge University Press & Assessment 2024 Page 16 of 18


0478/23 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
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

No creditable response. At least one programming technique Some programming techniques used The range of programming techniques
has been used. are appropriate to the problem. used is appropriate to the problem.
Any use of selection, iteration, More than one technique seen applied All criteria stated for the scenario have
counting, totalling, input and output. to the scenario, check list of been covered by the use of
techniques needed. appropriate programming techniques,
check list of techniques needed.

Some data has been stored but not Some of the data structures chosen The data structures chosen are
appropriately. are appropriate and store some of the appropriate and store all the data
Any use of variables or arrays or data 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.

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

No creditable response. Program seen without relevant Program seen with some relevant The program has been fully
comments. comment(s). commented.

Some identifier names used are The majority of identifiers used are Suitable identifiers with names
appropriate. appropriately named. meaningful to their purpose have
Some of the data structures used Most of the data structures used have been used throughout.
have meaningful names. meaningful names. All of the data structures used have
meaningful names.

© Cambridge University Press & Assessment 2024 Page 17 of 18


0478/23 Cambridge IGCSE – Mark Scheme May/June 2024
PUBLISHED
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

The solution is illogical. The solution contains parts that may The program is in a logical order.
be illogical.

The solution is inaccurate in many The solution contains parts that are The solution is accurate.
places. inaccurate. Solution logically performs all the
Solution contains few lines of code Solution contains lines of code with tasks given in the scenario. Ignore
with errors that attempt to perform a some errors that logically perform minor syntax errors.
task given in the scenario. tasks given in the scenario. Ignore
minor syntax errors.

The solution attempts at least one of The solution attempts to meet most of The solution meets all the
the requirements. 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
attempt at least one task given in the attempt most tasks given in the in the scenario.
scenario. scenario.

© Cambridge University Press & Assessment 2024 Page 18 of 18


Cambridge IGCSE™

COMPUTER SCIENCE 0478/21


Paper 2 Algorithms, Programming and Logic October/November 2024
MARK SCHEME
Maximum Mark: 75

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 2024 series for most
Cambridge IGCSE, Cambridge International A and AS Level components, and some Cambridge O Level
components.

This document consists of 16 printed pages.

© Cambridge University Press & Assessment 2024 [Turn over


0478/21 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
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 descriptions 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.

© Cambridge University Press & Assessment 2024 Page 2 of 16


0478/21 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
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.

© Cambridge University Press & Assessment 2024 Page 3 of 16


0478/21 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
Question Answer Marks

1 D 1

Question Answer Marks

2 C 1

Question Answer Marks

3 One mark for each correct line 4

Operator Operator type

=
Boolean

AND

Arithmetic

DIV

Logical
+

© Cambridge University Press & Assessment 2024 Page 4 of 16


0478/21 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
Question Answer Marks

4 One mark for each point 3


• analysis
• design
• testing

Question Answer Marks

5 One mark for each method identified, one mark for a further description (max six) 6
• structure diagram (1) a hierarchical diagram showing the breakdown of a computer program into sub-programs (1)
• flowchart (1) a diagram showing the ordered steps to complete a computer program (1)
• pseudocode (1) shows what a program does in plain language (1)

Question Answer Marks

6(a) One mark for each point (max three) 3


• 06 T  0
• 08 IF A[C] = 0
• 14 NEXT C // NEXT

6(b) One mark for outputting T 3


One mark for outputting I
One mark for suitable messages

Example:
15 OUTPUT "Number of zeros in the array is ", T
16 OUTPUT "Total of non-zero elements in the array is ", I

© Cambridge University Press & Assessment 2024 Page 5 of 16


0478/21 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
Question Answer Marks

6(c) One mark for a meaningful identifier for the array 3


A MyArray

One mark for 2 meaningful identifiers, Two marks for 3 meaningful identifiers:
T Counter
C Index
I Total

Question Answer Marks

7(a) One mark for each point 3


• NOT X
• Y XOR Z
• expression correct: NOT X OR (Y XOR Z) // (Y XOR Z) OR NOT X

© Cambridge University Press & Assessment 2024 Page 6 of 16


0478/21 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
Question Answer Marks

7(b) 4 marks for 8 correct outputs 4


3 marks for 6/7 correct outputs
2 marks for 4/5 correct outputs
1 mark for 2/3 correct outputs

X Y Z W

0 0 0 1

0 0 1 1

0 1 0 1

0 1 1 1

1 0 0 0

1 0 1 1

1 1 0 1

1 1 1 0

© Cambridge University Press & Assessment 2024 Page 7 of 16


0478/21 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
Question Answer Marks

8(a) 6
One mark for:
START
START
• correct use of flowchart symbols
• working flowlines
INPUT Password
• input correct
• working length check
• working comparison
• correct output messages
No
IS Length
Password >= 8 ?

Yes

IS Password <> No
OldPass?

Yes

OUTPUT OUTPUT
"accepted" "rejected"

STOP

8(b) One mark for each point 3


• OPENFILE [Link] FOR WRITE
• WRITEFILE [Link], Password
• CLOSEFILE [Link]

© Cambridge University Press & Assessment 2024 Page 8 of 16


0478/21 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
Question Answer Marks

8(c) One mark for each point 2


• needs to be retrieved on demand // saved for a later date
• storage must be non-volatile

Question Answer Marks

9(a) One mark for each error identified and correction: 4


• Line 03 Temp should be Temperature
• Line 04 = should be <>
• Line 14 OR should be AND
• Line 19 WHILE should be UNTIL

01 REPEAT
02 OUTPUT "Please enter temperature "
03 INPUT Temperature
04 IF Temperature <> 999
05 THEN
06 IF Temperature > 38.0
07 THEN
08 OUTPUT "Temperature too high"
09 ENDIF
10 IF Temperature < 35.0
11 THEN
12 OUTPUT "Temperature too low"
13 ENDIF
14 IF Temperature >= 35.0 AND Temperature <= 38.0
15 THEN
16 OUTPUT "Temperature normal"
17 ENDIF
18 ENDIF
19 UNTIL Temperature = 999

© Cambridge University Press & Assessment 2024 Page 9 of 16


0478/21 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
Question Answer Marks

9(b) One mark for each point 2


• greater than or equal to 35
• and less than or equal to 38

9(c) One mark for each correct column max two 2


Temperature OUTPUT

(Please enter temperature)

34.22 Temperature too low

(Please enter temperature)

36.1 Temperature normal

(Please enter temperature)

37.4 Temperature normal

(Please enter temperature)

38.0 Temperature normal

(Please enter temperature)

999

Question Answer Marks

10(a) 19 1

10(b)(i) ChNo 1

© Cambridge University Press & Assessment 2024 Page 10 of 16


0478/21 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
Question Answer Marks

10(b)(ii) Unique identifier 1

10(c) One mark for each 2


• CH04 0.0
• CH05 50.0

10(d)(i) One mark each correct line 3


SELECT Name
FROM CheeseStock
WHERE NOT InStock // InStock = No / "No" / False // WHERE WeightKg = 0.0;

10(d)(ii) One mark for each point 2


• WHERE clause can check either the InStock field for FALSE / No / "No" or
• the WeightKg field for 0.0

© Cambridge University Press & Assessment 2024 Page 11 of 16


0478/21 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
Question Answer Marks

11 • AO2 (maximum 9 marks) 15


• AO3 (maximum 6 marks)

Data Structures required names shown underlined must be used as given in the scenario.
1D Array or list MemberName[], MemberTime[], MemberCertificate[], Position[]
Variables Index, Last, ClubSize, TempTime, TempName, Swap, Count

Requirements (techniques)
R1 Input and verify the members times (input and iteration)
R2 sort the MemberName[] and MemberTime[] arrays in ascending order of time and outputs the top three members and
their times (nested iteration, sorting, selection and output)
R3 Storing the members names who will receive a certificate and outputting the number of certificates (iteration, selection,
counting and output)

© Cambridge University Press & Assessment 2024 Page 12 of 16


0478/21 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
Question Answer Marks

11 Example 15-mark answer in pseudocode


CONSTANT ClubSize = 200 // setting the number of members in the club
DECLARE Array Position[1:3} STRING
DECLARE Position : ARRAY[1:3] OF STRING

Position[1]  "First"
Position[2]  "Second"
Position[3]  "Third"

FOR Index  1 TO ClubSize // 200


REPEAT
PRINT "Please enter the time for ", MemberName[Index]
INPUT Time1
PRINT “Please re-enter the time”
INPUT Time2
IF Time1 <> Time2
THEN
PRINT "Incorrect input, the times should be the same, please re-enter"
ENDIF
UNTIL Time1 = Time2
MemberTime[Index]  Time1
NEXT Index

Last ClubSize
REPEAT
Swap  FALSE
FOR Index  1 TO ClubSize - 1
IF MemberTime[Index] > MemberTime[Index + 1]
THEN
TempTime  MemberTime[Index]
MemberTime[Index]  MemberTime[Index + 1]
MemberTime[Index + 1]  TempTime
TempName  MemberName[Index]
MemberName[Index]  MemberName[Index + 1]
MemberName[Index + 1]  TempName

© Cambridge University Press & Assessment 2024 Page 13 of 16


0478/21 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
Question Answer Marks

11 Swap  TRUE
ENDIF
NEXT Index
Last  Last - 1
UNTIL NOT Swap or Last = 1

FOR Index  1 TO 3
OUTPUT Position[Index], MemberName[Index], " with a time of ", MemberTime[Index]
NEXT Index

Count  0

FOR Index  1 TO ClubSize // 200


IF MemberTime[Index] < 240
THEN
Count  Count + 1
MemberCertificate[Count]  MemberName[Index]
ENDIF
NEXT Index

OUTPUT "Number of certificates to be printed is ", Count

© Cambridge University Press & Assessment 2024 Page 14 of 16


0478/21 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
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

No creditable response. At least one programming technique Some programming techniques used The range of programming
has been used. are appropriate to the problem. techniques used is appropriate to the
Any use of selection, iteration, More than one technique seen problem.
counting, totalling, input and output. applied to the scenario, check list of All criteria stated for the scenario
techniques needed. have been covered by the use of
appropriate programming
techniques, check list of techniques
needed.

Some data has been stored but not Some of the data structures chosen The data structures chosen are
appropriately. are appropriate and store some of appropriate and store all the data
Any use of variables or arrays or the data required. required.
other language dependent data More than one data structure used The data structures used store all
structures e.g. Python lists. to store data required by the the data required by the scenario.
scenario.

© Cambridge University Press & Assessment 2024 Page 15 of 16


0478/21 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
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

No creditable response. Program seen without relevant Program seen with some relevant The program has been fully
comments. comment(s). commented

Some identifier names used are The majority of identifiers used are Suitable identifiers with names
appropriate appropriately named. meaningful to their purpose have
Some of the data structures used Most of the data structures used been used throughout.
have meaningful names. have meaningful names. All of the data structures used have
meaningful names.

The solution is illogical. The solution contains parts that may The program is in a logical order.
be illogical.

The solution is inaccurate in many The solution contains parts that are The solution is accurate.
places. inaccurate. Solution logically performs all the
Solution contains few lines of code Solution contains lines of code with tasks given in the scenario. Ignore
with errors that attempt to perform a some errors that logically perform minor syntax errors.
task given in the scenario. tasks given in the scenario. Ignore
minor syntax errors.

The solution attempts at least one of The solution meets most of the The solution meets all the
the requirements. requirements. requirements given in the question.
Solution contains lines of code that Solution contains lines of code that Solution performs all the tasks given
attempt at least one task given in the perform most tasks given in the in the scenario.
scenario. scenario.

© Cambridge University Press & Assessment 2024 Page 16 of 16


Cambridge IGCSE™

COMPUTER SCIENCE 0478/22


Paper 2 Algorithms, Programming and Logic October/November 2024
MARK SCHEME
Maximum Mark: 75

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 2024 series for most
Cambridge IGCSE, Cambridge International A and AS Level components, and some Cambridge O Level
components.

This document consists of 14 printed pages.

© Cambridge University Press & Assessment 2024 [Turn over


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2024

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
descriptions 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.

© Cambridge University Press & Assessment 2024 Page 2 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2024

Question Answer Marks

1 C 1

Question Answer Marks

2 C 1

Question Answer Marks

3(a) One mark for each correct line 4

Flowchart symbol Purpose

subroutine

process

flow

decision

terminator

© Cambridge University Press & Assessment 2024 Page 3 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2024

Question Answer Marks

3(b) One mark per mark point 6

• Two labelled terminators START and STOP


• Loop initialisation, incrementation and termination
• Input with prompt
• Total initialised and totalling of inputs
• Output with message
• Fully correct flowchart with all correct arrows, yes/no labels and symbols

START

Total  0

Count  1

OUTPUT "Enter a
value between 1
and 100"

INPUT Number

Total  Total + Number No


o

IS Count
Count  Count + 1 > 50 ?

Yes

OUTPUT "The total


is ", Total

STOP

© Cambridge University Press & Assessment 2024 Page 4 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2024

Question Answer Marks

4(a) One mark per mark point 5

• Line 02 / DECLARE Counter : STRING


should be DECLARE Counter : INTEGER

• Line 09 / Temp  TRUE


should be Swapped  TRUE

• Line 10 / WHILE Swapped = TRUE OR Pass <= Limit - 1 DO


should be WHILE Swapped = TRUE AND Pass <= Limit - 1 DO

• Line 17 / ItemList[Counter]  Temp


should be ItemList[Counter + 1]  Temp

• Line 19 / ENDCASE
should be ENDIF

Correct algorithm:

01 DECLARE ItemList : ARRAY[1:100] OF STRING


02 DECLARE Counter : INTEGER
03 DECLARE Limit : INTEGER
04 DECLARE Pass : INTEGER
05 DECLARE Swapped : BOOLEAN
06 DECLARE Temp : STRING
07 Limit  100
08 Pass  1
09 Swapped  TRUE
10 WHILE Swapped = TRUE AND Pass <= Limit - 1 DO
11 Swapped  FALSE
12 FOR Counter  1 TO Limit – Pass
13 IF ItemList[Counter] > ItemList[Counter + 1]
14 THEN
15 Temp  ItemList[Counter]
16 ItemList[Counter]  ItemList[Counter + 1]
17 ItemList[Counter + 1]  Temp
18 Swapped  TRUE
19 ENDIF
20 Pass  Pass + 1
21 NEXT Counter
22 ENDWHILE

4(b) One mark per mark point (max three) 3

• The use of a flag (set initially to FALSE) to show if a swap has been
made (during the current iteration)
• … to stop the loop if it has been sorted
• The reduction in the limit of the (inner) loop after each iteration (of the loop)
• … to reduce the number of comparisons / iterations required

© Cambridge University Press & Assessment 2024 Page 5 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2024

Question Answer Marks

5(a) One mark per mark point (max one) 1

• Design
• Coding
• Testing

5(b) One mark per mark point (max three) 3

• Abstraction
• Discard/remove irrelevant information / hiding complexities /
keeping the key elements of the problem
• Decomposition of the problem
• Breaking the problem into inputs, processes and outputs
• Identification of the problem
• Identification of the requirements of the solution to the problem
• Research into the problem by data collection
• Example of data collection

Question Answer Marks

6 One mark for naming the type of check and one mark for an expansion (max 2
two)

• Visual check
• … looking at the data that has been entered and either confirming it is
correct or showing / correcting errors.

OR

• Double entry check // Data entered twice


• … data is entered twice and the two sets of data are compared (by
the computer). If they don’t match, an error has been input, so re-entry
is requested.

© Cambridge University Press & Assessment 2024 Page 6 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2024

Question Answer Marks

7(a) One mark per mark point (max five) 5

• Correct Value column


• Correct Count column
• Correct Answer column (down to first OUTPUT (120)) – Shaded grey
• Correct Answer column (remaining rows)
• Correct OUTPUT column

Value Count Answer OUTPUT

5 5

4 20

3 60

2 120

1 120 120

6 6

5 30

4 120

3 360

2 720

1 720 720

−1

7(b) One mark for correct answer 1


Example:
• It multiplies the input number by one less than itself repeatedly, until the
value is 1
• It calculates the number of permutations of all the numbers up to the input
value

7(c) One mark per mark point (max two) 2

• The program would accept the value and enter the FOR loop
• Count would keep reducing by 1 and would never reach 1, as it would
already be less than 1
• There would be an endless loop

© Cambridge University Press & Assessment 2024 Page 7 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2024

Question Answer Marks

8 One mark per mark point (max four) 4

• 80
• The largest whole number that would be accepted / at the very limit
/ Boundary/Extreme data that would be accepted / at the very limit
• 81
• The smallest whole number that would be rejected / is greater than
the limit / Boundary/Abnormal/Erroneous data that would be
rejected / is greater than the limit

Question Answer Marks

9(a) One mark for each correct gate, with the correct input(s) as shown. 4

Q X

© Cambridge University Press & Assessment 2024 Page 8 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2024

Question Answer Marks

9(b) Four marks for eight correct outputs 4


Three marks for six or seven correct outputs
Two marks for four or five correct outputs
One mark for two or three correct outputs

P Q R X

0 0 0 1

0 0 1 0

0 1 0 0

0 1 1 1

1 0 0 1

1 0 1 1

1 1 0 0

1 1 1 1

Question Answer Marks

10 One mark per mark point (max six) 6

• Declaration of appropriate string variable(s)


• Input of a line of text
• Correct use of LCASE
• Correct use of LENGTH
• Opening of at least one of the required text files using given names
([Link], [Link])
• Storing of correct line of text to [Link]
• Storing of correct lines to [Link]
• Closing of both text files
• Correct output

For example:

DECLARE LineOfText : STRING


DECLARE LowercaseText: STRING
INPUT LineOfText
OPENFILE [Link] FOR WRITE
WRITEFILE [Link], LineOfText
CLOSEFILE [Link]
LowercaseText  LCASE(LineOfText)
OUTPUT LowercaseText, LENGTH(LineOfText)
OPENFILE [Link] FOR WRITE
WRITEFILE [Link], LowercaseText
CLOSEFILE [Link]

© Cambridge University Press & Assessment 2024 Page 9 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2024

Question Answer Marks

11(a) One mark per mark point 2

• Fields – 11
• Records – 15

11(b) The Type field contains data that repeats / Data is not unique 1

11(c) Two marks for four correct fields 2


One mark for two or three correct fields

Field Data type

RoomNo // Type alphanumeric

Mon // Tue // Wed // Thu // Fri // Sat // Sun Boolean

Rate$ real

Guests integer

11(d) One mark per mark point 3

• Data from 4 correct columns printed – any number of rows, any order
• Data in rows ordered as shown (row and column) at least two rows
and two columns required
• All data correct with no extra content

Correct output

104S Single 1 72.50


105S Single 1 72.50
201F Family 4 160.00
301D Double 2 200.00
304P Suite 6 700.00

© Cambridge University Press & Assessment 2024 Page 10 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2024

Question Answer Marks

12 • AO2 (maximum 9 marks) 15


• AO3 (maximum 6 marks)

Data Structures required with names as given in the scenario:


Arrays or lists Rooms[], Dimensions[]

Variables Number

Requirements (techniques):

R1 Input and store number of rooms, the names of the rooms and their
dimensions, including validation of number of rooms (input with prompts,
(nested) iteration, use of variables, 1D and 2D arrays, validation).
R2 Calculate and store the area of each room, the total area of the house
and the average room area rounded to two decimal places. Find the
smallest and largest rooms (calculation, totalling, rounding, finding
maximum and minimum values, iteration).
R3 Output the results, including contents of the arrays and the calculated
data (iteration, output).

Example 15-mark answer in pseudocode


// input and validation of number of rooms
REPEAT
OUTPUT "How many rooms are in your house (enter a
number between 3 and 20 inclusive)?"
INPUT Number
IF Number < 3 OR Number > 20
THEN
OUTPUT "The number of rooms must be between 3 and
20 inclusive, please try again"
ENDIF
UNTIL Number >= 3 AND Number <= 20

// input of room names and dimensions – could be more


than one loop
FOR InLoop  1 TO Number
OUTPUT "Enter the name of room ", InLoop
INPUT Rooms[InLoop]
OUTPUT "Enter the length of the room in metres"
INPUT Dimensions[InLoop, 1]
OUTPUT "Enter the width of the room in metres"
INPUT Dimensions[InLoop, 2]
Dimensions[InLoop, 3]  ROUND(Dimensions[InLoop, 1]
* Dimensions[InLoop, 2], 2)
NEXT InLoop

// calculates total area and average area – rounded


values have been stored
TotArea  0
FOR Total  1 TO Number
TotArea  TotArea + Dimensions[Total, 3]
NEXT Total
AvArea  ROUND(TotArea / Number, 2)

© Cambridge University Press & Assessment 2024 Page 11 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2024

Question Answer Marks

12 // finding largest and smallest rooms


Larea  0
Sarea  100000
Lindex  1
Sindex  1
FOR Count  1 TO Number
IF Dimensions[Count, 3] > Larea
THEN
Larea  Dimensions[Count, 3]
Lindex  Count
ENDIF
IF Dimensions[Count, 3] < Sarea
THEN
Sarea  Dimensions[Count, 3]
Sindex  Count
ENDIF
NEXT Count

// outputting the results


FOR OutLoop  1 TO Number
OUTPUT "Room: ", Rooms[Outloop]
OUTPUT "Length: ", Dimensions[OutLoop, 1], " metres"
OUTPUT "Width: ", Dimensions[OutLoop, 2], " metres"
OUTPUT "Area: ", Dimensions[OutLoop, 3], " square
metres"
Next OutLoop
OUTPUT "The largest room is: ", Rooms[Lindex]
OUTPUT "The smallest room is: ", Rooms[Sindex]
OUTPUT "The total area of the house is: ", TotArea, "
square metres"
OUTPUT "The average area of the rooms is: ", AvArea, "
square metres"

© Cambridge University Press & Assessment 2024 Page 12 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2024

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

No creditable At least one Some programming The range of


response. programming techniques used are programming
technique has been appropriate to the techniques used is
used. problem. appropriate to the
Any use of selection, More than one problem.
iteration, counting, technique seen applied All criteria stated for
totalling, input and to the scenario, check the scenario have
output. list of techniques been covered by the
needed. use of appropriate
programming
techniques, check list
of techniques needed.

Some data has been Some of the data The data structures
stored but not structures chosen are chosen are appropriate
appropriately. appropriate and store and store all the data
Any use of variables or some of the data required.
arrays or other required. The data structures
language dependent More than one data used store all the data
data structures e.g. structure used to store required by the
Python lists. data required by the scenario.
scenario.

© Cambridge University Press & Assessment 2024 Page 13 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2024

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

No creditable Program seen without Program seen with The program has been
response. relevant comments. some relevant fully commented.
comment(s).

Some identifier names The majority of Suitable identifiers with


used are appropriate. identifiers used are names meaningful to
Some of the data appropriately named. their purpose have
structures used have Most of the data been used throughout.
meaningful names. structures used have All of the data
meaningful names. structures used have
meaningful names.

The solution is illogical. The solution contains The program is in a


parts that may be logical order.
illogical.

The solution is The solution contains The solution is


inaccurate in many parts that are accurate.
places. inaccurate. Solution logically
Solution contains few Solution contains lines performs all the tasks
lines of code with of code with some given in the scenario.
errors that attempt to errors that logically Ignore minor syntax
perform a task given in perform tasks given in errors.
the scenario. the scenario. Ignore
minor syntax errors.

The solution attempts The solution attempts The solution meets all
at least one of the to meet most of the the requirements given
requirements. requirements. in the question.
Solution contains lines Solution contains lines Solution performs all
of code that attempt at of code that attempts the tasks given in the
least one task given in most tasks given in the scenario.
the scenario. scenario.

© Cambridge University Press & Assessment 2024 Page 14 of 14


Cambridge IGCSE™

COMPUTER SCIENCE 0478/23


Paper 2 Algorithms, Programming and Logic October/November 2024
MARK SCHEME
Maximum Mark: 75

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 2024 series for most
Cambridge IGCSE, Cambridge International A and AS Level components, and some Cambridge O Level
components.

This document consists of 14 printed pages.

© Cambridge University Press & Assessment 2024 [Turn over


0478/23 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
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 descriptions 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.

© Cambridge University Press & Assessment 2024 Page 2 of 14


0478/23 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
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.

© Cambridge University Press & Assessment 2024 Page 3 of 14


0478/23 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
Question Answer Marks

1 C 1

Question Answer Marks

2 B 1

Question Answer Marks

3 One mark for each correct line 4

Logic gate Logic gate symbol

AND

NAND

NOR

XOR

© Cambridge University Press & Assessment 2024 Page 4 of 14


0478/23 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
Question Answer Marks

4 One mark for each correct term 6


Database tables consist of rows/columns/fields/records and columns/rows/fields/records
Rows are records.
columns are fields.
Structured Query Language (SQL) scripts are used to query data.
A primary key uniquely identifies a record.

Question Answer Marks

5 One mark for stage, one mark for matching description and one mark for matching expansion (max six) 6
For example:
• design (1) construction of a solution (1) using standard methods e.g. flowcharts (1)
• coding (1) program is written (1) iterative testing takes place (1)
• testing (1) program is tested for errors (1) program is tested that it meets its requirements (1)

Question Answer Marks

6(a) One mark for each point 3


• 06 C  1
• 08 W  W + A[C]
• 11 X  W / (C – 1) // ROUND(W / (C – 1),0)

6(b) One mark for outputting X 3


One mark for outputting C - 1
One mark for suitable messages

Example:

12 OUTPUT "Number of values stored in the array is ", C - 1


13 OUTPUT "Average of non-zero elements in the array is ", X

© Cambridge University Press & Assessment 2024 Page 5 of 14


0478/23 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
Question Answer Marks

6(c) One mark for meaningful identifier for the array 3


A Values

Two marks for 3 meaningful identifiers for the variables


or
One mark for 1 to 2 meaningful identifiers for the variables

C Index
X Average
W Total

Question Answer Marks

7 One mark for test data type, one mark for matching example and one mark for matching outcome (Max nine) 9
• normal (1) e.g. 25 (1) accepted (1)
• extreme (1) 1/100 (1) accepted (1)
• abnormal (1) e.g. 125 (1) rejected (1)
• boundary (1) 1 and 0 // 100 and 101 (1) first value is accepted, and second value rejected (1)

© Cambridge University Press & Assessment 2024 Page 6 of 14


0478/23 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
Question Answer Marks

8 4 marks for 8 correct outputs 4


3 marks for 6/7 correct outputs
2 marks for 4/5 correct outputs
1 mark for 2/3 correct outputs

A T H W

0 0 0 0

0 0 1 0

0 1 0 1

0 1 1 0

1 0 0 0

1 0 1 0

1 1 0 0

1 1 1 0

Question Answer Marks

9 One mark for each error identified and correction 4

• first decision box flow line labels Yes should be No and vice versa
• second decision box OR should be AND
• Flow line from A to B should be should A  B
• Flowchart symbol for A  C should be a process box / rectangle

© Cambridge University Press & Assessment 2024 Page 7 of 14


0478/23 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
Question Answer Marks

10(a) MYWORD 6

Password Accept Index Found OUTPUT

MYWORD TRUE (Please enter


password)

FALSE

FALSE

1 FALSE

FALSE Rejected

M!word

Password Accept Index Found OUTPUT

M!word TRUE (Please enter


password)

FALSE

1 FALSE

FALSE Rejected

© Cambridge University Press & Assessment 2024 Page 8 of 14


0478/23 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
Question Answer Marks

10(a) My!Hidden

Password Accept Index Found OUTPUT

My!Hidden TRUE (Please enter


password)

1 FALSE

2 FALSE

3 TRUE

Accepted

For each trace table, one mark Password and output, one mark Accept, Index and Found columns

10(b) One mark for each correct point 3

• maximum length 20 characters and minimum length 8 characters


• cannot be all upper-case letters or all lower-case letters // must contain upper-case and lower-case letters
• must contain an !

Question Answer Marks

11(a) One mark for each line (max two) 3


One mark for order of lines

MT12 Pebbles large


MT06 Cobbles

© Cambridge University Press & Assessment 2024 Page 9 of 14


0478/23 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
Question Answer Marks

11(b)(i) One mark for correct SELECT and FROM clauses, one mark for correct WHERE clause 2

SELECT Name
FROM BuildStock
WHERE NOT InStock // InStock = FALSE / No /"No" // WHERE NumberBags = 0;

11(b)(ii) Two marks for either point 2

• WHERE clause can check the InStock field (1) for FALSE / No (1)
or
• WHERE clause can check the NumberBags field (1) for 0 (1)

© Cambridge University Press & Assessment 2024 Page 10 of 14


0478/23 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
Question Answer Marks

12 • AO2 (maximum 9 marks) 15


• AO3 (maximum 6 marks)

Data Structures required names shown underlined must match those given in the scenario
2D Array or list PickerName[], PickedWeight[], PickerCertificate[]
Variables

Requirements (techniques)
R1 Input and validate the weights (input and iteration)
R2 sort the PickerName[], and PickedWeight[]arrays in descending order of weight (nested iteration and sorting)
R3 Output top two members and the weights. Storing the members names who will receive a certificate and outputting the
number of certificates (iteration, selection, assignment, counting and output with appropriate messages)

Example 15-mark answer in pseudocode

CONSTANT GroupSize = 200 // setting the number of members in the club


DECLARE Position : Array[1:2} OF STRING

Position[1]  "Best in Group"


Position[2]  "Second best in Group"

FOR Index  1 TO GroupSize


REPEAT
PRINT "Please enter the weight for ", PickerName[Index],
INPUT PickedWeight[Index]
UNTIL PickedWeight[Index] > 0 AND PickedWeight[Index] < 15
NEXT Index
Last  GroupSize
REPEAT
Swap  FALSE

© Cambridge University Press & Assessment 2024 Page 11 of 14


0478/23 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
Question Answer Marks

12 FOR Index  1 TO GroupSize -1


IF PickedWeight[Index] < PickedWeight[Index + 1]
THEN
TempWeight  PickedWeight[Index]
PickedWeight[Index]  PickedWeight[Index + 1]
PickedWeight [Index + 1]  TempWeight
TempName  PickerName[Index]
PickerName[Index]  PickerName[Index + 1]
PickerName[Index + 1]  TempName
Swap  TRUE
ENDIF
NEXT Index
Last  Last - 1
UNTIL NOT Swap or Last = 1
FOR Index  1 TO 2
OUTPUT Position[Index], PickerName[Index], " with a weight of ", PickedWeight[Index]
NEXT Index
Index  1
Count  0
WHILE PickedWeight[Index] > 3 DO // count number of certificates required and store names
Count  Count + 1
PickerCertificate[Count]  PickerName[Index]
Index  Index + 1
ENDWHILE
OUTPUT "Number of certificates to be printed is ", Count

© Cambridge University Press & Assessment 2024 Page 12 of 14


0478/23 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
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

No creditable response. At least one programming technique Some programming techniques used The range of programming
has been used. are appropriate to the problem. techniques used is appropriate to the
Any use of selection, iteration, More than one technique seen problem.
counting, totalling, input and output. applied to the scenario, check list of All criteria stated for the scenario
techniques needed. have been covered by the use of
appropriate programming
techniques, check list of techniques
needed.

Some data has been stored but not Some of the data structures chosen The data structures chosen are
appropriately. are appropriate and store some of appropriate and store all the data
Any use of variables or arrays or the data required. required.
other language dependent data More than one data structure used The data structures used store all
structures e.g. Python lists. to store data required by the the data required by the scenario.
scenario.

© Cambridge University Press & Assessment 2024 Page 13 of 14


0478/23 Cambridge IGCSE – Mark Scheme October/November 2024
PUBLISHED
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

No creditable response. Program seen without relevant Program seen with some relevant The program has been fully
comments. comment(s). commented

Some identifier names used are The majority of identifiers used are Suitable identifiers with names
appropriate appropriately named. meaningful to their purpose have
Some of the data structures used Most of the data structures used been used throughout.
have meaningful names. have meaningful names. All of the data structures used have
meaningful names.

The solution is illogical. The solution contains parts that may The program is in a logical order.
be illogical.

The solution is inaccurate in many The solution contains parts that are The solution is accurate.
places. inaccurate. Solution logically performs all the
Solution contains few lines of code Solution contains lines of code with tasks given in the scenario. Ignore
with errors that attempt to perform a some errors that logically perform minor syntax errors.
task given in the scenario tasks given in the scenario. Ignore
minor syntax errors.

The solution attempts at least one of The solution meets most of the The solution meets all the
the requirements. requirements. requirements given in the question.
Solution contains lines of code that Solution contains lines of code that Solution performs all the tasks given
attempt at least one task given in the perform most tasks given in the in the scenario.
scenario. scenario.

© Cambridge University Press & Assessment 2024 Page 14 of 14


Cambridge IGCSE™

COMPUTER SCIENCE 0478/22


Paper 2 Algorithms, Programming and Logic February/March 2023
MARK SCHEME
Maximum Mark: 75

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 February/March 2023 series for most
Cambridge IGCSE™, Cambridge International A and AS Level components and some Cambridge O Level
components.

This document consists of 16 printed pages.

© UCLES 2023 [Turn over


0478/22 Cambridge IGCSE – Mark Scheme February/March 2023
PUBLISHED
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.

© UCLES 2023 Page 2 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2023
PUBLISHED
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.

Mark scheme abbreviations

/ separates alternative words / phrases within a marking point


// separates alternative answers within a marking point
underline actual word given must be used by candidate (grammatical variants accepted)
max indicates the maximum number of marks that can be awarded
() the word / phrase in brackets is not required, but sets the context

Note: No marks are awarded for using brand names of software packages or hardware.

© UCLES 2023 Page 3 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2023
PUBLISHED
Question Answer Marks

1 C 1

Question Answer Marks

2(a) One mark for each single correct line from a description to statement 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

© UCLES 2023 Page 4 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2023
PUBLISHED
Question Answer Marks

2(b) One mark for each point: 5


• Initialisation of total to zero before loop
• appropriate loop controls
• totalling statement inside the loop, must use array Number[] with an index
• calculation of average outside loop
• output of average outside loop

Example: Total  0
FOR Count  1 TO 50
Total  Total + Number[Count]
NEXT Count
Average  Total / 50
OUTPUT "The average is ", Average

Question Answer Marks

3 One mark for each point max two. 3


• check that the program works as expected
• check for logic/runtime errors
• check that the program rejects any invalid data that is input
• check that the program only accepts reasonable data

One mark for example


Normal // erroneous // abnormal // extreme // boundary

© UCLES 2023 Page 5 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2023
PUBLISHED
Question Answer Marks

4 One mark for each point max three. 3


• variables / constants are used to store items of data
• the data stored in variables / constants are accessed by an identifier // named data stores
• the value of a variable may change during the execution of a program
• the value of a constant will remain the same during the execution of a program

Question Answer Marks

5 One mark for a suitable hierarchical structure 4


One mark for suitable names for the sub systems for user input and display options
One mark for sub systems for user inputs, (choice of display,) food order and payment
One mark for sub systems for display output types, pictures and list

© UCLES 2023 Page 6 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2023
PUBLISHED
Question Answer Marks

6(a) One mark for each error identified and correction 3


• Line 05 OUTPUT UsefulEnergyOut should be INPUT UsefulEnergyOut
• Line 06 IF TotalEnergyIn <> -1 AND UsefulEnergy <> -1 should be:
IF TotalEnergyIn <> -1 AND UsefulEnergyOut <> -1
• 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

Question Answer Marks

7(a) One mark for each correct gate, with the correct inputs as shown. 5

© UCLES 2023 Page 7 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2023
PUBLISHED
Question Answer Marks

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

© UCLES 2023 Page 8 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2023
PUBLISHED
Question Answer Marks

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 NumberSales, Total, SaleValue


One mark for columns Average and OUTPUT

8(b) Error – one mark for identification of error 3


for example including negative numbers / not differentiation between negative and positive values
Correction
One mark for correct placement and one mark for appropriate action
For example – after the input box insert a decision box to reject negative numbers

© UCLES 2023 Page 9 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2023
PUBLISHED
Question Answer Marks

9(a) 20 1

9(b)(i) CatNo 1

9(b)(ii) It is a unique identifier // no repeated values 1

9(c) Two marks for 4 correct data types or one mark for 2 or 3 correct data types 2
Field Data type

CatNo Text/Alphanumeric

Title Text/alphanumeric

Fiction Boolean

Price Real

9(d) One mark for each correct row 2


BK08 The Princesses’ Story B Penn
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" // Author = 'B Penn' // Author Like "B Penn"

© UCLES 2023 Page 10 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2023
PUBLISHED
Question Answer Marks

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 using ROUND
One mark for correctly returning TRUE and FALSE
One mark for correct function call

Example definition:
FUNCTION Same(A : INTEGER, B : REAL) RETURNS BOOLEAN
IF A = ROUND(B,0)
THEN
RETURN TRUE
ELSE
RETURN FALSE
ENDIF
ENDFUNCTION

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

© UCLES 2023 Page 11 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2023
PUBLISHED
Question Answer Marks

11 Read and understand the question before starting to mark any scripts. Read the whole answer before marking a script: 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 (Python, [Link] or
Java)
On script if requirement met add seen, NE if partial attempt, cross if no attempt (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: to
• AO2 (maximum 9 marks)
• AO3 (maximum 6 marks)

Data Structures required with names as given in the scenario


Arrays or lists TeamName, TeamPoints
Variables LeagueSize, MatchNo

Requirements (techniques)
R1 calculates total points for all matches played by each team (nested iteration, totalling)
R2 counts and outputs, with the team’s name, for each team
the total number of away wins, home wins, drawn matches and lost matches
(nested iteration, counting, output)
R3 finds and outputs
the name of the team with the highest number of points and the name of the team with the lowest number of points.
(output, selection)

© UCLES 2023 Page 12 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2023
PUBLISHED
Question Answer Marks

11 Example 15-mark answer in pseudocode:


// meaningful identifier names and appropriate data structures to store the data required
DECLARE TeamCounter : INTEGER
DECLARE MatchCounter : INTEGER
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]
3 : AwayWinNo  AwayWinNo + 1
2 : HomeWinNo  HomeWinNo + 1
1 : DrawNo  DrawNo + 1
0 : 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 ", LostNo

© UCLES 2023 Page 13 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2023
PUBLISHED
Question Answer Marks

11 // 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

NEXT TeamCounter

// output names of the teams with the highest and lowest number of points
OUTPUT "Top Team ", TeamName[TopTeam]
OUTPUT "Bottom Team ", TeamName[BottomTeam]

© UCLES 2023 Page 14 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2023
PUBLISHED
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

No creditable response. At least one programming Some programming techniques The range of programming
technique has been used. used are appropriate to the techniques used is appropriate to
Any use of selection, iteration, problem. the problem.
counting, totalling, input and More than one technique seen All criteria stated for the scenario
output. applied to the scenario, check list have been covered by the use of
of techniques needed. appropriate programming
techniques, check list of
techniques needed.

Some data has been stored but Some of the data structures The data structures chosen are
not appropriately. chosen are appropriate and store appropriate and store all the data
Any use of variables or arrays or some of the data required. required.
other language dependent data More than one data structure used The data structures used store all
structures e.g. Python lists. to store data required by the the data required by the scenario.
scenario.

© UCLES 2023 Page 15 of 16


0478/22 Cambridge IGCSE – Mark Scheme February/March 2023
PUBLISHED
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

No creditable response. Program seen without relevant Program seen with some relevant The program has been fully
comments. comment(s). commented

Some identifier names used are The majority of identifiers used are Suitable identifiers with names
appropriate. appropriately named. meaningful to their purpose have
Some of the data structures used Most of the data structures used been used throughout.
have meaningful names. have meaningful names. All of the data structures used
have meaningful names.

The solution is illogical. The solution contains parts that The program is in a logical order.
may be illogical.

The solution is inaccurate in many The solution contains parts that The solution is accurate.
places. are inaccurate. Solution logically performs all the
Solution contains few lines of code Solution contains lines of code tasks given in the scenario. Ignore
with errors that attempt to perform with some errors that logically minor syntax errors.
a task given in the scenario. perform tasks given in the
scenario. Ignore minor syntax
errors.

The solution attempts at least one The solution meets most of the The solution meets all the
of the requirements. requirements. requirements given in the
Solution contains lines of code that Solution contains lines of code that question.
attempt at least one task given in perform most tasks given in the Solution performs all the tasks
the scenario. scenario. given in the scenario.

© UCLES 2023 Page 16 of 16


Cambridge IGCSE™

COMPUTER SCIENCE 0478/21


Paper 2 Algorithms, Programming and Logic May/June 2023
MARK SCHEME
Maximum Mark: 50

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 2023 series for most
Cambridge IGCSE, Cambridge International A and AS Level and Cambridge Pre-U components, and some
Cambridge O Level components.

This document consists of 18 printed pages.

© UCLES 2023 [Turn over


0478/21 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
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.

© UCLES 2023 Page 2 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
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.

© UCLES 2023 Page 3 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

1(a) One mark for each correct line. 4

Program development life cycle description Program development life cycle stage

develop an algorithm to solve the analysis


problem using structure diagrams,
flowcharts or pseudocode

coding
detect and fix the errors in the
program
design

identify the problem and its


requirements
evaluation

write and implement the


instructions to solve the problem testing

1(b) One mark for naming or describing each component part, max three 3

For example:

inputs // what is put into the system


processes // actions taken to achieve a result
outputs // what is taken out of the system
storage // what needs to be kept for future use

© UCLES 2023 Page 4 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

2 A 1

Question Answer Marks

3(a) One mark per mark point, max two 2

 Validation is an automated check carried out by a computer


 … to make sure the data entered is sensible/acceptable/reasonable

3(b) One mark for each appropriate test data, max three 6
One mark for each correct accompanying reason, max three

For example:

Normal – 75
Reason – the data lies within the required range and should be accepted

Abnormal – Sixty
Reason – this is the wrong data type and should be rejected

Extreme – 200
Reason – the highest value in the required range that should be accepted

© UCLES 2023 Page 5 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

4 One mark per mark point, max four 4

DIV, max two


 To perform integer division
 Meaning only the whole number part of the answer is retained
 Example of DIV For example DIV(9,4) = 2

ROUND, max two


 To return a value rounded to a specified number of digits / decimal places
 The result will either be rounded to the next highest or the next lowest value
 … depending on whether the value of the preceding digit is >=5 or <5
 Example of ROUND for example, ROUND(4.56, 1) = 4.6

© UCLES 2023 Page 6 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

5(a) One mark per mark point, max four 4

 Line 04 / IF Number < 0


should be IF Number > 0

 Line 10 / Exit  1 // Line 01/ Exit  1 and Line 02 / WHILE Exit <> 0
should be Exit  0 // should be Exit  0 and WHILE Exit = 0

 Line 13 / ENDIF
should be ENDWHILE

 Line 14 / OUTPUT "The total value of your numbers is ", Number


should be OUTPUT "The total value of your numbers is ", Total

Correct algorithm:

01 Exit  1
02 WHILE Exit <> 0 DO
03 INPUT Number
04 IF Number > 0
05 THEN
06 Total  Total + Number
07 ELSE
08 IF Number = 0
09 THEN
10 Exit  0
11 ENDIF
12 ENDIF
13 ENDWHILE
14 OUTPUT "The total value of your numbers is ", Total

© UCLES 2023 Page 7 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

5(b) One mark per mark point, max four 4


 Initialise a new (counting) variable
 … Count  0 // to count the acceptable numbers
 Insert a counting statement between lines 05 and 07
 … Count  Count + 1
 Add a new output after the loop/after line 13 / at the end (of the program)
 … OUTPUT Count

Question Answer Marks

6 One mark for each correct feature, max two 4


One mark for each correct accompanying reason, max two

For example:

Meaningful identifiers – to enable the programmer (or future programmers) to easily recognize the purpose of a variable /
array / constant // to enable easy tracking of a variable / constant / array through the program

Use of comments – to annotate each section of a program so that a programmer can find specific sections / so that the
programmer knows the purpose of that section of code

Procedures and functions – to make programs modular and easier to update / add functionality

© UCLES 2023 Page 8 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

7(a) One mark per correct column, max four 4

Pointer Letter Choice OUTPUT

1 F

6 Letter F is represented by Foxtrot

Another Letter? (Y or N)

1 D

4 Letter D is represented by Delta

Another Letter? (Y or N)

7(b) (Linear) search 1

© UCLES 2023 Page 9 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

7(c) One mark per mark point, max two 2

 The algorithm would not stop


 … because it would not have found the item it was seeking

Or

 The array would run out of values after the pointer reached 13
 the algorithm will crash

Question Answer Marks

8(a) One mark per mark point, max three 3


 Storing string in Phrase
 Correct use of LENGTH function
 Correct use of UCASE function
 Correct outputs of LENGTH and UCASE

For example:

Phrase  "The beginning is the most important part"


OUTPUT LENGTH(Phrase)
OUTPUT UCASE(Phrase)

8(b) One mark for each correct line, max two 2

40
THE BEGINNING IS THE MOST IMPORTANT PART

© UCLES 2023 Page 10 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

9(a) One mark for each correct gate, with the correct input(s) as shown. 4

© UCLES 2023 Page 11 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

9(b) Four marks for eight correct outputs. 4


Three marks for six or seven correct outputs.
Two marks for four or five correct outputs.
One mark for two or three correct outputs

A B C Z

0 0 0 0

0 0 1 1

0 1 0 1

0 1 1 0

1 0 0 0

1 0 1 0

1 1 0 1

1 1 1 0

Question Answer Marks

10(a) One mark for the correct field name 2


One mark for the correct reason

For example:

TVCode
Each entry in this field is a unique identifier

© UCLES 2023 Page 12 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

10(b) Two marks for four correct answers. 2


One mark for two or three correct answers.

Field Data type

TVCode Text

ScreenSize Integer

SmartTV Boolean

Price$ Real

10(c) One mark for each correct answer 4

ScreenSize
Price$
FROM
YES

Correct code:

SELECT TVCode, ScreenSize, Price$


FROM TVRange
WHERE SmartTV = YES;

© UCLES 2023 Page 13 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
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 (Python, [Link] or Java).
On place a SEEN mark if requirement met, cross if no attempt seen, omission mark and/or comment if partially met (see
marked scripts).

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:
 AO2 (maximum 9 marks)
 AO3 (maximum 6 marks)

Data structures required:


The names underlined must match those given in the scenario:

Arrays or lists Days[], Readings[], AverageTemp[]

Variables WeekLoop, DayLoop, InTemp, TotalDayTemp, TotalWeekTemp, AverageWeekTemp

Requirements (techniques):
R1 Input and store hourly temperatures and validation of input temperatures for each day (with prompts, range check and
(nested)iteration)
R2 Calculate, round to one decimal place and store daily average temperatures and calculate the weekly average
temperature rounded to one decimal place (iteration, totalling and rounding)
R3 Convert all average temperatures to Fahrenheit (to one decimal place) and output the average temperatures in both
Celsius and Fahrenheit. Output with appropriate messages. (output and rounding)

© UCLES 2023 Page 14 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

11 Example 15 mark answer in pseudocode

// meaningful identifiers and appropriate data structures for


// all data required
DECLARE Days : ARRAY[1:7] OF STRING
DECLARE Readings : ARRAY[1:7, 1:24] OF REAL
DECLARE AverageTemp : ARRAY[1:7] OF REAL
DECLARE WeekLoop : INTEGER
DECLARE DayLoop : INTEGER
DECLARE InTemp : REAL
DECLARE TotalDayTemp : REAL
DECLARE TotalWeekTemp : REAL
DECLARE AverageWeekTemp : REAL
// initial population of Days[] array
// input and a loop are also acceptable
Days[1]  "Sunday"
Days[2]  "Monday"
Days[3]  "Tuesday"
Days[4]  "Wednesday"
Days[5]  "Thursday"
Days[6]  "Friday"
Days[7]  "Saturday"
// input temperatures inside nested loop
FOR WeekLoop  1 TO 7
TotalDayTemp  0
FOR DayLoop  1 TO 24
OUTPUT "Enter temperature ", DayLoop, " for ", Days[WeekLoop]

© UCLES 2023 Page 15 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

11 INPUT InTemp
// validation of input for between -20 and +50 inclusive
WHILE InTemp < -20.0 OR InTemp > 50.0 DO
OUTPUT "Your temperature must be between -20.0 and +50.0 inclusive. Please try
again"
INPUT InTemp
ENDWHILE
Readings[WeekLoop, DayLoop]  InTemp
// totalling of temperatures during the day
TotalDayTemp  TotalDayTemp + ROUND(InTemp, 1)
NEXT DayLoop

// average temperature for the day


AverageTemp[WeekLoop]  ROUND(TotalDayTemp / 24,1)
NEXT WeekLoop
// calculate the average temperature for the week
TotalWeekTemp  0
FOR WeekLoop  1 TO 7
TotalWeekTemp  TotalWeekTemp + AverageTemp[WeekLoop]
NEXT WeekLoop

AverageWeekTemp  ROUND(TotalWeekTemp / 7,1)


// outputs in Celsius and Fahrenheit
FOR WeekLoop  1 TO 7
OUTPUT "The average temperature on ", Days[WeekLoop], " was ", AverageTemp[WeekLoop], "
Celsius and ",
ROUND(AverageWeekTemp * 9 / 5 + 32), 1, " Fahrenheit"
NEXT WeekLoop

OUTPUT "The average temperature for the week was ",


AverageWeekTemp," Celsius and ", ROUND(AverageWeekTemp * 9 / 5 + 32, 1),"
Fahrenheit"

© UCLES 2023 Page 16 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
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 technique has Some programming techniques used are The range of programming techniques
been used. appropriate to the problem. used is appropriate to the problem.

Any use of selection, iteration, counting, More than one technique seen applied All criteria stated for the scenario have
totalling, input and output. to the scenario, check the list of been covered by the use of appropriate
techniques needed. programming techniques, check the list
No creditable of 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
required. required.
Any use of variables or arrays or other
language dependent data structures e.g. More than one data structure used to The data structures used store all the
Python lists. store data required by the scenario. data required by the scenario.

© UCLES 2023 Page 17 of 18


0478/21 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
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).

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 have Most of the data structures used 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.
No creditable The solution is inaccurate in many The solution contains parts that are The solution is accurate.
response. places. inaccurate.
Solution logically performs all the tasks
Solution contains few lines of code with Solution contains lines of code with given in the scenario. Ignore minor
errors that attempt to perform a task some errors that logically perform tasks syntax errors.
given in the scenario. given in the scenario. Ignore minor
syntax errors.

The solution attempts at least one of the The solution meets most of the The solution meets all the requirements
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 the perform most tasks given in the the scenario.
scenario. scenario.

© UCLES 2023 Page 18 of 18


Cambridge IGCSE™

COMPUTER SCIENCE 0478/22


Paper 2 Algorithms, Programming and Logic May/June 2023
MARK SCHEME
Maximum Mark: 50

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 2023 series for most
Cambridge IGCSE, Cambridge International A and AS Level and Cambridge Pre-U components, and some
Cambridge O Level components.

This document consists of 16 printed pages.

© UCLES 2023 [Turn over


0478/22 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
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.

© UCLES 2023 Page 2 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
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.

Please note the following further points:

The words in bold in the mark scheme are important text that needs to be present, or some notion of it needs to be present. It does not have to
be the exact word, but something close to the meaning.

If a word is underlined, this exact word must be present.

A single forward slash means this is an alternative word. A double forward slash means that this is an alternative mark point.

Ellipsis (…) on the end of one-mark point and the start of the next means that the candidate cannot get the second mark point without being
awarded the first one. If a mark point has an ellipsis at the beginning, but there is no ellipsis on the mark point before it, then this is just a follow-on
sentence and can be awarded without the previous mark point.

© UCLES 2023 Page 3 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

1 A 1

Question Answer Marks

2 One mark for each correct line 4

Logic gate Standard symbol

AND

OR

NAND

NOT

Question Answer Marks

3 One mark for each correct answer 3


 structure diagram / chart
 flowchart
 pseudocode

© UCLES 2023 Page 4 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

4(a) One mark for each point (max three). 3


 range check with acceptable values is (greater than) zero and less than 1000
 presence check to ensure the program will not continue until a value has been entered
 type/character check to ensure that a number is entered
 length check to ensure there are no more than 3 digits entered

4(b)(i) To verify the data / for verification / as a verification check // to make sure that no changes are made to the data on entry 1

4(b)(ii) One mark for each point (max three). 3


 use of iteration
 use of two inputs
 to check that the two inputs are the same / different
 use of the given variable Measurement

For example
REPEAT
OUTPUT "Please enter measurement "
INPUT Measurement
OUTPUT "Please re-enter measurement "
INPUT MeasurementCheck
UNTIL Measurement = MeasurementCheck

Question Answer Marks

5 Due to an issue with Question 5, the question has been removed from the question paper.

© UCLES 2023 Page 5 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

6 One mark for each feature and one mark for corresponding example (max six) 6
 ensuring that all identifiers have meaningful names …
 … example using Total to store a running total
 using comments to explain how the program works …
 … example // all values are zeroed before the next calculation
 using procedures and functions for the tasks within a program …
 … example CalculateInterest(Deposit, Rate)

Question Answer Marks

7(a)  07 3
 04/12 or 16/18
 02/20

7(b) One mark for each error identified and correction 3


 Line 07 Total  Total + Number * Counter
should be Total  Total + Number[Counter] * Counter
 Line 08 IF Number[Counter] = 0
should be IF Number[Counter] = -1 // should be IF Number[Counter] < 0
 Line 16 FOR Counter  0 TO 5
should be FOR Counter  1 TO 5

© UCLES 2023 Page 6 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

7(c) One mark for place in algorithm (max one) 4


 around lines 05 and 06
 line 07
 (immediately) after the input of the number

Three marks pseudocode


One mark for each point (max three)
 Use of REPEAT … UNTIL // any working loop structure
 check for >0 // >=0
 check for <10 // >9
 check for whole number
 check for -1
 check for length of digit <> 1

Example
REPEAT
OUTPUT "Enter a digit "
INPUT Number[Counter]
UNTIL Number[Counter] = Round(Number[Counter],0) AND ((Number[Counter] = -1) OR
(Number[Counter] > 0 AND Number[Counter] < 10))

© UCLES 2023 Page 7 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

8 4 marks for 8 correct outputs 4


3 marks for 6/7 correct outputs
2 marks for 4/5 correct outputs
1 mark for 2/3 correct outputs

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

© UCLES 2023 Page 8 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

9(a) One mark for each column F, C and T 5


Two marks for columns X[1] to X[5] all entries correct or
One mark for columns X[1] to X[5] with one error

F C X[1] X[2] X[3] X[4] X[5] T

10 1 5 7 11

0 1 10

1 2 1 10 10

1 3 5 10 10

1 4 7 10

0 1

9(b) One mark for each point 2


 (bubble) sort data in array
 in ascending order

© UCLES 2023 Page 9 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

10(a) SongNumber 1

10(b) One mark for every two correct data types 2

Field Data Type

SongNumber Text/Alphanumeric

Title Text/Alphanumeric

Recorded Date/time

Minutes Real

10(c) One mark for each point 3


 to find the total number of minutes of music
 to find the total number of songs
 available for the genre rock

Question Answer Marks

11(a) One mark for any two correct lines 2

DECLARE P : STRING
P  "The world"
DECLARE Q : CHAR
Q  'W'

© UCLES 2023 Page 10 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

11(b) One mark for each point (max four) 4


 converting P to upper case
 finding the length of P
 using a loop to check for position of Q
 using the string operation substring
 storing the loop counter in Position if the value is found

For example:
P  UCASE(P)
Counter  1
Position  0
REPEAT
IF SUBSTRING(P, Counter, 1) = Q
THEN
Position  Counter
ENDIF
Counter  Counter + 1
UNTIL Position <> 0 OR Counter = LENGTH(P)

11(c) 5 1

© UCLES 2023 Page 11 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

12 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 (Python, [Link] or Java)
Mark SEEN on script if requirement met, cross if no attempt seen, NE 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 Account, AccDetails
Variable Size, AccountNumber

Requirements (techniques)
R1 Check account number and password (iteration and validation, selection, input, output)
R2 Display menu and make a selection (output, input and selection)
R3 Perform actions selected (use of arrays and procedures with parameters)

Example 15 mark answer in pseudocode


// Procedures to be called
PROCEDURE CheckDetails(AccID : INTEGER)
DECLARE Name, Password : STRING // local variables
Valid  FALSE
IF AccID <0 OR AccID > Size
THEN
OUTPUT "Invalid Account Number"
ELSE
OUTPUT "Please Enter Name "
INPUT Name
OUTPUT "Please Enter Password "
INPUT Password
IF Name <> Account[AccID,1] OR Password <> Account[AccID,2]
THEN
OUTPUT "Invalid name or password"
ELSE

© UCLES 2023 Page 12 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

12 Valid  True
ENDIF
ENDIF
ENDPROCEDURE

PROCEDURE Balance(AccID : INTEGER)


OUTPUT "Your balance is ", AccDetails[AccID,1]
ENDPROCEDURE

PROCEDURE WithDrawal(AccID : INTEGER)


DECLARE Amount : REAL // local variable
REPEAT
OUTPUT "Please enter amount to withdraw "
INPUT Amount
IF Amount > AccDetails[AccID,3]
THEN
OUTPUT "Amount greater than withdrawal limit"
ENDIF
IF Amount > AccDetails[AccID,2] + AccDetails[AccID,1]
THEN
OUTPUT "Amount greater than cash available"
ENDIF
IF Amount <= AccDetails[AccID,3] AND Amount < AccDetails[AccID,2] +
AccDetails[AccID,1]
THEN
AccDetails[AccID,1]  AccDetails[AccID,1] - Amount
ENDIF
UNTIL Amount<= AccDetails[AccID,3] AND Amount > AccDetails[AccID,2] +
AccDetails[AccID,1] AND Amount > 0
ENDPROCEDURE

PROCEDURE Deposit(AccID : INTEGER)


DECLARE Amount : REAL // local variable
REPEAT
OUTPUT "Please enter a positive amount to deposit "
INPUT Amount
UNTIL Amount >0
AccDetails[AccID,1]  AccDetails[AccID,1] + Amount

© UCLES 2023 Page 13 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

12 ENDPROCEDURE

// Declarations of global variables for information – not required in candidate responses


DECLARE AccountNumber, Choice : INTEGER
DECLARE Valid, Exit : BOOLEAN

OUTPUT "Please enter your account number "


INPUT AccountNumber
CheckDetails(AccountNumber)

IF Valid
THEN
REPEAT
OUTPUT "Menu"
OUTPUT "1. display balance"
OUTPUT "2. withdraw money"
OUTPUT "3. deposit money"
OUTPUT "4. exit"
OUTPUT "please choose 1, 2, 3 or 4"
INPUT Choice
CASE OF Choice
1 : Balance(AccountNumber)
2 : Withdrawal(AccountNumber)
3 : Deposit(AccountNumber)
4 : Exit  TRUE
OTHERWISE OUTPUT "Invalid choice"
ENDCASE
UNTIL Choice = 4
ELSE
OUTPUT "Invalid account number "
ENDIF

© UCLES 2023 Page 14 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
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 technique Some programming techniques used The range of programming techniques
has been used. are appropriate to the problem. used is appropriate to the problem.

Any use of selection, iteration, More than one technique seen applied All criteria stated for the scenario have
counting, totalling, input and output. to the scenario, check the list of been covered by the use of
techniques needed. appropriate programming techniques,
No creditable check the list of techniques needed.
response.
Some data has been stored but not Some of the data structures chosen The data structures chosen are
appropriately. are appropriate and store some of the appropriate and store all the data
data required. required.
Any use of variables or arrays or other
language dependent data structures More than one data structure used to The data structures used store all the
e.g. Python lists. store data required by the scenario. data required by the scenario.

© UCLES 2023 Page 15 of 16


0478/22 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
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
comments. comment(s). commented.

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 have Most of the data structures used have
meaningful names. meaningful names. All of the data structures used have
meaningful names.

The solution is illogical. The solution contains parts that may The program is in a logical order.
be illogical.
No creditable The solution is inaccurate in many The solution contains parts that are The solution is accurate.
response. 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
with errors that attempt to perform a some errors that logically perform syntax errors.
task given in the scenario. tasks given in the scenario. Ignore
minor syntax errors.

The solution attempts at least one of The solution meets most of the The solution meets all the
the requirements. 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 the perform most tasks given in the the scenario.
scenario. scenario.

© UCLES 2023 Page 16 of 16


Cambridge IGCSE™

COMPUTER SCIENCE 0478/23


Paper 2 Algorithms, Programming and Logic May/June 2023
MARK SCHEME
Maximum Mark: 50

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 2023 series for most
Cambridge IGCSE, Cambridge International A and AS Level and Cambridge Pre-U components, and some
Cambridge O Level components.

This document consists of 19 printed pages.

© UCLES 2023 [Turn over


0478/23 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
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.

© UCLES 2023 Page 2 of 19


0478/23 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
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.

Please note the following further points:

The words in bold in the mark scheme are important text that needs to be present, or some notion of it needs to be present. It does not have to
be the exact word, but something close to the meaning.

If a word is underlined, this exact word must be present.

A single forward slash means this is an alternative word. A double forward slash means that this is an alternative mark point.

Ellipsis (…) on the end of one-mark point and the start of the next means that the candidate cannot get the second mark point without being
awarded the first one. If a mark point has an ellipsis at the beginning, but there is no ellipsis on the mark point before it, then this is just a follow-on
sentence and can be awarded without the previous mark point.

© UCLES 2023 Page 3 of 19


0478/23 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

1 B 1

Question Answer Marks

2 One mark per mark point, max four 4

MOD, max two


 To perform (integer) division when one number is divided by another
 … and find the remainder
 Allow example e.g. 7 MOD 2 = 1

RANDOM, max two


 To generate (pseudo) random numbers
 …(usually) within a specified range
 Allow example e.g. RANDOM() * 10 returns a random number between 0 and 10

Question Answer Marks

3 One mark per mark point, max three 3


MP1 A call statement is used in order to make use of a function // the function is called using its identifier
MP2 Parameters are / may be passed (from the main program) to the function (to be used within the function)
MP3 The function performs its task …
MP4 … and returns a value / values to the main program

Question Answer Marks

4(a) One mark per mark point, max two 2


 To ensure that data has been accurately copied // to ensure that changes have not been made to the values originally
intended when data is copied
 … from one source to another

© UCLES 2023 Page 4 of 19


0478/23 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

4(b) One mark for each appropriate verification check, max two 4
One mark for each correct accompanying use, max two

For example:

Verification check 1 – Visual check


Use – the user looks through the data that has been entered and confirms that no changes have been made.

Verification check 2 – Double data entry


Use – data is entered twice, the two entries are compared and if they do not match, a re-entry is requested.

Question Answer Marks

5(a) One mark for each correct line. 4

Description Check

to check that the data entered is an check digit


integer

format check
to check that some data has been
entered
length check
to check that the data entered has an
appropriate number of characters presence check

to check that an identification


type check
number contains no errors

© UCLES 2023 Page 5 of 19


0478/23 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

5(b) One mark per mark point, max three 3


 appropriate REPEAT / WHILE loop begin and end
 input of Length
 appropriate input prompt / error message
 correct loop exit/entry condition / selection

Example answers:

WHILE Loop

OUTPUT "Enter a number between 15 and 35 inclusive"


INPUT Length
WHILE Length <15 OR Length > 35 (DO)
OUTPUT "Your number must be between 15 and 35 inclusive
INPUT Length
ENDWHILE

REPEAT Loop

REPEAT
OUTPUT "Enter a number between 15 and 35 inclusive"
INPUT Length
UNTIL Length >= 15 AND LENGTH <= 35

© UCLES 2023 Page 6 of 19


0478/23 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

6(a) One mark per mark point, max four 4

 Line 01 / Counter  100


should be Counter  0

 Line 03 / While Counter > 100 DO


should be While Counter < 100 DO

 Line 07 / Total  Total + Counter


should be Total  Total + Number

 Line 09 / ENDCASE
should be ENDIF

Correct algorithm
01 Counter  0
02 Total  0
03 WHILE Counter < 100 DO
04 INPUT Number
05 IF Number > 0
06 THEN
07 Total  Total + Number
08 Counter  Counter + 1
09 ENDIF
10 ENDWHILE
11 OUTPUT "The total value of your numbers is ", Total
12 OUTPUT "The average value of your numbers is ", Total / 100

© UCLES 2023 Page 7 of 19


0478/23 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

6(b) One mark per mark point, max five 5


MP1 replace line 03
MP2 with FOR
MP3 … with limits 0 to 99 / 1 to 100
MP4 replace line 05 to check if Number is not positive
MP5 … (if Number is not positive) insert a validation and re-input routine between lines 06 and 07 …
MP6 … that will repeat until a positive value is entered
MP7 remove the counter update / line 08
MP8 replace line 10 / ENDWHILE with NEXT

© UCLES 2023 Page 8 of 19


0478/23 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

7(a) One mark per mark point, max six 6


 correct Total column
 correct Value column
 correct Five1 column
 correct Five2 column
 correct Ten1 and Ten2 columns
 correct OUTPUT column

Total Value Five1 Five2 Ten1 Ten2 OUTPUT

5 1 1 0 0.5 Rejected

50 10 10 5 5

50 52 10 10.4 Rejected

555 111 111 55 55.5 Rejected

57 11 11.4 Rejected

500 100 100 50 50

550 –1 550

7(b) One mark per mark point, max two 2


 to find if an input is divisible by (both 5 and) 10
 … add them together and output the total

© UCLES 2023 Page 9 of 19


0478/23 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

8(a) One mark for each correct gate, with the correct input(s) as shown. 4

© UCLES 2023 Page 10 of 19


0478/23 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

8(b) Four marks for eight correct outputs. 4


Three marks for six or seven correct outputs.
Two marks for four or five correct outputs.
One mark for two or three correct outputs

A B C Z

0 0 0 0

0 0 1 0

0 1 0 0

0 1 1 0

1 0 0 1

1 0 1 0

1 1 0 0

1 1 1 0

Question Answer Marks

9(a) DECLARE Saying : STRING 1

© UCLES 2023 Page 11 of 19


0478/23 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

9(b) One mark per mark point, max five 5


MP1 input a string into Saying
MP2 correct use of OPENFILE to write data
MP3 correct use of WRITEFILE to write Saying
MP4 correct use of CLOSEFILE
MP5 correct use of filename [Link] throughout

For example:

INPUT Saying
OPENFILE "[Link]" FOR WRITE
WRITEFILE "[Link]", Saying
CLOSEFILE "[Link]"

Question Answer Marks

10(a) One mark for each correct answer 2

Fields 5
Records 12

10(b) to uniquely identify a record 1

© UCLES 2023 Page 12 of 19


0478/23 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

10(c) Two marks for four correct answers. 2


One mark for two or three correct answers.

Field Data type

Type Alphanumeric

Private Boolean

Rate$ Integer

NumberGuest Integer

10(d) One mark per mark point, max three 3


 data correctly extracted in any two rows
 data correctly extracted in third row
 data in correct order horizontally and vertically

Example answer:

Bay Lodge 10 1000


Coppice Lodge 12 1200
West Lodge 12 1200

© UCLES 2023 Page 13 of 19


0478/23 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
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 (Python, [Link] or Java).
Mark SEEN on script if requirement met, cross if no attempt seen, NE 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:


The names underlined must match those given in the scenario:

Arrays or lists Contacts[]

Variables CurrentSize, Cont, Choice, NewContacts, Count, Count2, Flag

Requirements (techniques):
R1 Output menu and input choice, with validation (range check, output with messages, input with prompts).
R2 Input number of new entries, within limits, update current size of contacts, input new data and sort the array (range
check, totalling, iteration and bubble sort).
R3 Output array whole contents and delete contents of array (iteration, output with labelling/messages, array initialisation).

© UCLES 2023 Page 14 of 19


0478/23 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

11 Example 15 mark answer in pseudocode

// meaningful identifiers and appropriate data structures for


// all data required
DECLARE Contacts : ARRAY[1:100, 1:2] OF STRING
DECLARE CurrentSize : INTEGER
DECLARE Cont : BOOLEAN
DECLARE Choice : INTEGER
DECLARE NewContacts : INTEGER
DECLARE Count : INTEGER
DECLARE Count2 : INTEGER
DECLARE Flag : BOOLEAN
DECLARE Temp1 : STRING
DECLARE Temp2 : STRING

// the number of contacts in the array


CurrentSize  0

// to allow program to continue indefinitely


Cont  TRUE
WHILE Cont DO
// display menu
OUTPUT "Please choose one of the following: "
OUTPUT "Press 1 to enter new contacts "
OUTPUT "Press 2 to display your contacts "
OUTPUT "Press 3 to delete all contacts "
INPUT Choice
// validate choice as 1, 2 or 3
WHILE Choice = 1 AND CurrentSize = 100 DO
OUTPUT "Your contacts are full, please enter 2 or 3"
INPUT Choice
ENDWHILE
WHILE Choice < 1 OR Choice > 3 DO
OUTPUT "Incorrect entry – please enter 1, 2, or 3"
INPUT Choice
ENDWHILE

© UCLES 2023 Page 15 of 19


0478/23 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

11 // enter new contacts


IF Choice = 1
THEN
OUTPUT "How many contacts (1 to 5 only)?"
INPUT NewContacts
// validates new contacts input
WHILE NewContacts < 1 OR NewContacts > 5 DO
OUTPUT "You may only enter between 1 and 5 contacts. Please try again"
INPUT NewContacts
ENDWHILE
// checks the maximum size is not exceeded
WHILE CurrentSize + NewContacts > 100
OUTPUT "Not enough space in your contacts"
OUTPUT "The maximum number you may input is ", 100 – CurrentSize
INPUT NewContacts
ENDWHILE
FOR Count  CurrentSize + 1 TO CurrentSize + NewContacts
OUTPUT "Enter the contact name as last name, first name"
INPUT Contacts[Count, 1]
OUTPUT "Enter the telephone number"
INPUT Contacts[Count, 2]
NEXT Count
CurrentSize  CurrentSize + NewContacts
// bubble sort to sort array if it contains 2 or more contacts
IF CurrentSize >= 2
THEN
REPEAT
Flag  FALSE
FOR Count  1 TO CurrentSize-1
IF Contacts[Count + 1, 1] <
Contacts[Count, 1]
THEN
Flag  TRUE
Temp1  Contacts[Count, 1]
Temp2  Contacts[Count, 2]

© UCLES 2023 Page 16 of 19


0478/23 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
Question Answer Marks

11 Contacts[Count, 1]  Contacts[Count + 1, 1]
Contacts[Count, 2]  Contacts[Count + 1, 2]
Contacts[Count + 1, 1]  Temp1
Contacts[Count + 1, 2]  Temp2

ENDIF
NEXT Count
UNTIL NOT Flag
ENDIF
ENDIF
// display all contacts
IF Choice = 2
THEN
IF CurrentSize > 0
THEN
OUTPUT "Name and Telephone Number"
FOR Count  1 TO CurrentSize
OUTPUT Contacts[Count, 1], " ", Contacts[Count, 2]
NEXT Count
ENDIF
ENDIF
// delete all contacts
IF Choice = 3
THEN
FOR Count  1 TO 100
FOR Count2  1 TO 2
Contacts[Count, Count2]  ""
NEXT Count2
NEXT Count
ENDIF
ENDWHILE

© UCLES 2023 Page 17 of 19


0478/23 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED

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 technique Some programming techniques used The range of programming techniques
has been used. are appropriate to the problem. used is appropriate to the problem.

Any use of selection, iteration, More than one technique seen applied All criteria stated for the scenario have
counting, totalling, input and output. to the scenario, check the list of been covered by the use of
techniques needed. appropriate programming techniques,
No creditable check the list of techniques needed.
response.
Some data has been stored but not Some of the data structures chosen The data structures chosen are
appropriately. are appropriate and store some of the appropriate and store all the data
data required. required.
Any use of variables or arrays or other
language dependent data structures More than one data structure used to The data structures used store all the
e.g. Python lists. store data required by the scenario. data required by the scenario.

© UCLES 2023 Page 18 of 19


0478/23 Cambridge IGCSE – Mark Scheme May/June 2023
PUBLISHED
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
comments. comment(s). commented.

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 have Most of the data structures used have
meaningful names. meaningful names. All of the data structures used have
meaningful names.

The solution is illogical. The solution contains parts that may The program is in a logical order.
be illogical.
No creditable The solution is inaccurate in many The solution contains parts that are The solution is accurate.
response. 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
with errors that attempt to perform a some errors that logically perform syntax errors.
task given in the scenario. tasks given in the scenario. Ignore
minor syntax errors.

The solution attempts at least one of The solution meets most of the The solution meets all the
the requirements. 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 the perform most tasks given in the the scenario.
scenario. scenario.

© UCLES 2023 Page 19 of 19


Cambridge IGCSE™

COMPUTER SCIENCE 0478/21


Paper 2 Algorithms, Programming and Logic October/November 2023
MARK SCHEME
Maximum Mark: 75

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.

This document consists of 13 printed pages.

© UCLES 2023 [Turn over


0478/21 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
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.

© UCLES 2023 Page 2 of 13


0478/21 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
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.

© UCLES 2023 Page 3 of 13


0478/21 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
Question Answer Marks

1 C 1

Question Answer Marks

2 B 1

Question Answer Marks

3 One mark for each correct line from description to data type 4

Description Data type

BOOLEAN
a whole number

CHAR

a single letter

INTEGER

a word or phrase REAL

a number with two decimal STRING


places

© UCLES 2023 Page 4 of 13


0478/21 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
Question Answer Marks

4 One mark for each correct word 3


• array
• constant
• variable

Question Answer Marks

5(a) One mark for each point (max two) 2


• simplifying the problem
• removing unnecessary details from the problem // selecting elements required
• filtering out irrelevant characteristics from those elements

5(b) One mark for each point (max three) 3


• inputs
• processes
• outputs
• storage

5(c) One mark for stage, one mark for matching description (max two) 2
• design (1) details of solution set out (1)
• coding (1) program is developed (1)
• testing (1) program is tested for errors (1)

Question Answer Marks

6(a) Displaying/sort 10 names in alphabetical order 9 1

© UCLES 2023 Page 5 of 13


0478/21 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
Question Answer Marks

6(b) One mark for each point (max four) 4


• Initialisation
• inputting 10 names
• storing the names in an array
• sorting the names in alphabetical order using a bubble sort
• displaying the 10 names
• iteration

6(c) One mark for a meaningful identifier for the array 3


A Names // ArrayNames

Two marks for 3 meaningful identifiers for variables


One marks for 1 or 2 meaningful identifiers for variables
T Temp
C Counter
L Length

6(d) One mark for each point (max two) 2


• use of comments
• use of procedures/functions
• use of white space

Question Answer Marks

7(a) One mark for each point 4


• NOT A
• AND B
• OR NOT C
• expression correct (NOT A AND B) OR NOT C

© UCLES 2023 Page 6 of 13


0478/21 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
Question Answer Marks

7(b) 4
A B C X

0 0 0 1

0 0 1 0

0 1 0 1

0 1 1 1

1 0 0 1

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

Question Answer Marks

8(a) Range check 1

© UCLES 2023 Page 7 of 13


0478/21 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
Question Answer Marks

8(b) One mark for each of the following points 6


START
• correct use of flowchart symbols
• working flow lines and complete
INPUT Length • both inputs correct
• working range check
• working calculation
• correct output rounded to two decimal places
Is Length >=0.5 No
AND Length <=
6.0 ?

Yes

INPUT Cost

Price  Length * Cost

OUTPUT
"Price ",
ROUND(Price,2)

STOP

8(c) One mark for set of test data, one mark for purpose (max four) 4

Example:
1 and 1 (1) normal data to ensure the algorithm accepts this test data (1)
–1 and 1 (1) abnormal data for length to ensure that it is rejected (1)

© UCLES 2023 Page 8 of 13


0478/21 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
Question Answer Marks

8(d) One mark for two correct headings 3


Two marks for three correct headings
Three marks for all headings correct and no other headings unless used in 8(b)

Length Cost Price OUTPUT

8(e) One mark for each point (max two) 2


• validate Cost …
• … with a range/presence check
• add another validation check for Length

Question Answer Marks

9(a) One mark for each appropriate field name and correct data type 5
CatNo text/alphanumeric
Description text/alphanumeric
StockLevel integer
Price real
Painted Boolean

9(b)(i) CatNo 1

9(b)(ii) Unique identifier 1

9(c) SELECT lists the fields to be displayed 3


FROM identifies the table
WHERE identifies the search criteria

© UCLES 2023 Page 9 of 13


0478/21 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
Question Answer Marks

10 • AO2 (maximum 9 marks) 15


• AO3 (maximum 6 marks)

Data Structures required names shown underlined must be used as given in the scenario
2D Array or list Evening[1:10, 1:20] / Evening[0:9, 0:19]
Variables Counter, SeatCounter, NumSeats, Row, Column

Requirements (techniques)
R1 Find number of seats available for each performance and output (searching, nested iteration, output)
R2 Inputs and validates number of seats (input, iteration, and selection)
R3 Checking if seats available (selection, assignment, output with appropriate messages)

Example 15-mark answer in pseudocode

// meaningful identifier names and appropriate data structures to store the data required
DECLARE Counter, SeatCounter, NumSeats, Row, Column : INTEGER

CONSTANT HouseFull = 200


CONSTANT MaxRow = 10
CONSTANT MaxColumn = 20

SeatCounter1  0 // initialise seat counter for performance 1

© UCLES 2023 Page 10 of 13


0478/21 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
Question Answer Marks

10 FOR Row  1 TO 10
FOR Column  1 TO 20
IF Evening[Row, Column]
THEN
SeatCounter  SeatCounter + 1
ENDIF
NEXT Column
NEXT Row

// validate input
OUTPUT "How many seats do you want to book? 1, 2, 3 or 4 "
INPUT NumSeats

WHILE 1 < NumSeats OR NumSeats > 4 OR NumSeats <> ROUND(NumSeats, 0)


OUTPUT "Please enter 1, 2, 3 or 4 for the number of seats "
INPUT NumSeats
ENDWHILE

IF SeatCounter + NumSeats > 200)// check for house full


THEN
OUTPUT "House full"
ELSE
IF SeatCounter + NumSeats > 200 // checks for not enough seats
THEN
OUTPUT "Only ", SeatCounter + NumSeats – 200, " seats left"
ELSE
FOR Counter  1 TO NumSeats // book required number of seats for performance
Evening[MOD(SeatCounter + Counter, MaxColumn), DIV(SeatCounter +
Counter), MaxColumn]  TRUE
OUTPUT "Row ", MOD(SeatCounter + Counter, MaxColumn), " seat ",
DIV(SeatCounter + Counter, MaxColumn)," booked"
NEXT Counter
ENDIF

© UCLES 2023 Page 11 of 13


0478/21 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
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

No creditable At least one programming Some programming techniques used The range of programming techniques
response. technique has been used. are appropriate to the problem. used is appropriate to the problem.
Any use of selection, iteration, More than one technique seen All criteria stated for the scenario have
counting, totalling, input and applied to the scenario, check the list been covered by the use of
output. of techniques needed. appropriate programming techniques,
check list of techniques needed.

Some data has been stored but Some of the data structures chosen The data structures chosen are
not appropriately. are appropriate and store some of the appropriate and store all the data
Any use of variables or arrays or data 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.

© UCLES 2023 Page 12 of 13


0478/21 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED

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

No creditable Program seen without relevant Program seen with some relevant The program has been fully
response. comments. comment(s). commented

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 Most of the data structures used have used throughout.
used have meaningful names. meaningful names. All of the data structures used have
meaningful names.

The solution is illogical. The solution contains parts that may The program is in a logical order.
be illogical.

The solution is inaccurate in The solution contains parts that are The solution is accurate.
many places. inaccurate. Solution logically performs all the
Solution contains few lines of Solution contains lines of code with tasks given in the scenario. Ignore
code with errors that attempt to some errors that logically perform minor syntax errors.
perform a task given in the tasks given in the scenario. Ignore
scenario. minor syntax errors.

The solution attempts at least The solution attempts to meet most of The solution meets all the
one of the requirements. the requirements. requirements given in the question.
Solution contains lines of code Solution contains lines of code that Solution performs all the tasks given in
that attempt at least one task perform most tasks given in the the scenario.
given in the scenario. scenario.

© UCLES 2023 Page 13 of 13


Cambridge IGCSE™

COMPUTER SCIENCE 0478/22


Paper 2 Algorithms, Programming and Logic October/November 2023
MARK SCHEME
Maximum Mark: 75

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.

This document consists of 14 printed pages.

© UCLES 2023 [Turn over


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2023

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.

© UCLES 2023 Page 2 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2023

Question Answer Marks

1 A 1

Question Answer Marks

2(a) Format check 1

2(b) One mark for each appropriate test data, max two 4
One mark for each correct accompanying reason, max two

For example:

Normal – 30/12/1960 …
Reason – … (the date is written in the correct format and) should be
accepted.

Abnormal – 30/Dec/1960 …
Reason – … (the month is not written in the correct format and) should be
rejected.

2(c) One mark per mark point, max two 2


MP1 check that there are 10 characters in total
MP2 if the date is too long/short it will be rejected

Question Answer Marks

3(a) One mark for each correct line. 4

© UCLES 2023 Page 3 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2023

Question Answer Marks

3(b) One mark per mark point, max four 4


MP1 initialise a variable to store the lowest number set to a high value (at
least 100) / first value in the array
MP2 loop structure to iterate 25 times
MP3 use of IF to check if the array element is less than the current lowest
value
MP4 …if it is, set this to the lowest value
MP5 output the result (with an appropriate message) after the loop

Example answer:
Min  100
FOR Count  1 TO 25
IF Temperatures[Count] < Min
THEN
Min  Temperatures[Count]
ENDIF
NEXT Count
OUTPUT "The lowest temperature is ", Min

Question Answer Marks

4(a) One mark per mark point, max four 4

MP1 Line 01 / DECLARE City ARRAY[1:50, 1:2] OF BOOLEAN


should be DECLARE City : ARRAY[1:50, 1:2] OF STRING
Line 05 / IF should be REPEAT
MP2 Line 07 / INPUT City[Count, 2]should be INPUT
City[Count, 1]
MP3 Line 11 / UNTIL Count = 50 // Line 04 / Count  1 AND Line
10 / Count  Count + 1 should be UNTIL Count = 51 /
UNTIL Count > 50 // Line 04 / Count  0 AND move Line 10
to beginning of loop / Line 06
MP4 Line 12 / FOR Out  1 TO 1 should be FOR Out  1 TO 50

Correct algorithm:
01 DECLARE City : ARRAY[1:50, 1:2] OF STRING
02 DECLARE Count : INTEGER
03 DECLARE Out : INTEGER
04 Count  1
05 REPEAT
06 OUTPUT "Enter the name of the city"
07 INPUT City[Count, 1]
08 OUTPUT "Enter the name of the country"
09 INPUT City[Count, 2]
10 Count  Count + 1
11 UNTIL Count > 50
12 FOR Out  1 TO 50
13 OUTPUT "The city ", City[Out, 1], " is in ",
City[Out, 2]
14 NEXT Out

© UCLES 2023 Page 4 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2023

Question Answer Marks

4(b) One mark per mark point, max five 5


MP1 add an input (and prompt to ask) for the country to be searched
MP2 …between lines 11 and 12
MP3 …using a new variable for the input
MP4 Add an IF statement to check if the current Country array element
matches the country being searched
MP5 …between lines 12 and 13
MP6 …if it does, allow the output in line 13 // the output in line 13 should
be after a THEN
MP7 If it does not, check the next element.

Question Answer Marks

5 One mark per mark point, max three 3


MP1 variables and constants should have meaningful identifiers
MP2 …so that programmers/future programmers are able to understand
their purpose
MP3 they are both used for data storage
MP4 constants store values that never change during the execution of a
program // by example
MP5 variables contain values that have been calculated within the
program / can change during the execution of the program // by
example

© UCLES 2023 Page 5 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2023

Question Answer Marks

6(a) One mark per correct column, max five 5

Value Average Total Count OUTPUT

0 0

25 25 1

35 60 2

3 63 3

0 21 Total is 63

Average is 21

0 0

57 57 1

20 77 2

25 102 3

18 120 4

0 30 Total is 120

Average is 30

0 0

−1

6(b) One mark per mark point, max two 2


MP1 to add together / find the average of a batch of numbers
MP2 the total and average are output (when the batch is complete/when
0 is entered)
MP3 when 0 is entered a new batch is started.

© UCLES 2023 Page 6 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2023

Question Answer Marks

7 One mark per mark point, max five 5


MP1 storing string in Quote
MP2 correct assignment for Start // sending correct start value
MP3 correct assignment for Number // sending correct number of
characters
MP4 use of SUBSTRING function with first parameter as Quote, or
equivalent, plus two other parameters
MP5 correct use of LCASE function
MP6 two correct outputs

For example:
Quote  "Learning Never Exhausts The Mind"
Start  25
Number  8
OUTPUT SUBSTRING(Quote, Start, Number)
OUTPUT LCASE(Quote)

Question Answer Marks

8 One mark per mark point, max four 4

Procedures, max three


MP1 to enable the programmer to write a collection of programming
statements under a single identifier
MP2 to allow modular programs to be created // to allow procedures to be
re-used within the program or in other programs
MP3 to make program creation faster because procedures can be re-used
// to enable different programmers to work on different procedures in
the same project
MP4 to make programs shorter (than using the repeated code) / using less
duplication of code // to make programs easier to maintain due to
being shorter.

Parameters, max three


MP5 to pass values from the main program to a procedure / function
MP6 …so that they can be used in the procedure / function
MP7 allow the procedure / function to be re-used with different data.

© UCLES 2023 Page 7 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2023

Question Answer Marks

9(a) One mark for each correct gate, with the correct input(s) as shown. 4

9(b) Four marks for eight correct outputs. 4


Three marks for six or seven correct outputs.
Two marks for four or five correct outputs.
One mark for two or three correct outputs

A B C Z

0 0 0 1

0 0 1 1

0 1 0 1

0 1 1 1

1 0 0 1

1 0 1 1

1 1 0 0

1 1 1 1

© UCLES 2023 Page 8 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2023

Question Answer Marks

10(a) 18 1

10(b) One mark for the correct field name 2


One mark for the correct reason

For example:
Code …
…Each entry in this field is a unique identifier

10(c) Two marks for four correct answers. 2


One mark for two or three correct answers.

Field Data type

Breed text

Gender Boolean

Age integer

Arrived date/time

10(d) One mark for each correct answer 3

SELECT
Horses
BreedOrigin

Correct SQL:

SELECT Code, Breed


FROM Horses
WHERE BreedOrigin = "Scotland";

© UCLES 2023 Page 9 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2023

Question Answer Marks

11 Requirements may be met using a suitable built-in function from the 15


programming language used (Python, [Link] or Java)

Tables for AO2 and AO3 are used to award a mark in a suitable band using a
best fit approach.

Marks are available for:


• AO2 (maximum 9 marks)
• AO3 (maximum 6 marks)

Data Structures required with names as given in the scenario


The names underlined must be used as they are provided in the scenario:

Arrays or lists WoodType[], Price[], Customers[], Quotations[]

Requirements (techniques)
R1 Input and store customer name, room length and width, with validation of
input for room dimensions, including error message and repeated input
(Input with prompts, range check and iteration).
R2 Initialise wood arrays. Calculate room area, select and store wood
required. Determine cost of wood type and calculate price of wood to
purchase. Round and store all data to relevant array (array initialisation,
rounding, data retrieval from array, calculation and storage of results).
R3 Output full details: name of customer, choice of wood and quotation price
with appropriate messages. Program continues for next customer (Output
with messages, iteration of whole program).

© UCLES 2023 Page 10 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2023

Question Answer Marks

11 Example 15-mark answer in pseudocode

// declarations not required in the answer


// initial population of WoodType[] and Price[] arrays
// input and loops are also acceptable
WoodType[1]  "Laminate"
WoodType[2]  "Pine"
WoodType[3]  "Oak"
Price[1]  29.99
Price[2]  39.99
Price[3]  54.99
// initialises starting customer in sales arrays
CurrentCustomer  1
// to allow program to continue to next customer
Cont  TRUE
WHILE Cont DO
// input customer name
OUTPUT "Input the customer’s name "
INPUT Customers[CurrentCustomer]
// input of room dimensions with validation
OUTPUT "What is the length of your room? "
INPUT RoomLength
// validate RoomLength
WHILE RoomLength < 1.5 OR RoomLength > 10.0
OUTPUT "The measurement must be in the range 1.5
to 10.0 inclusive, please try again "
INPUT RoomLength
ENDWHILE
OUTPUT "What is the width of your room? "
INPUT RoomWidth
// validate RoomWidth

WHILE RoomWidth < 1.5 OR RoomWidth > 10.0


OUTPUT "The measurement must be in the range 1.5
to 10.0 inclusive, please try again "
INPUT RoomWidth
ENDWHILE
RoomArea  ROUND(RoomLength, 1) * ROUND(RoomWidth,
1)
RoomArea  ROUND (RoomArea + 0.5, 0)
// show the wood available and prices
OUTPUT "the wood choices available are:"
OUTPUT "Number Wood Type Price($)"
FOR Count  1 TO 3
OUTPUT Count, " ", WoodType[Count], " ",

© UCLES 2023 Page 11 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2023

Question Answer Marks

11 Price[Count]
Next Count
// input wood choice
OUTPUT "Input a number from 1 to 3 "
INPUT WoodChoice
// validate wood choice
WHILE WoodChoice < 1 OR WoodChoice > 3
OUTPUT "Your input is out of range, please try
again "
INPUT WoodChoice
ENDWHILE
// to calculate the total cost of the wood
WoodCost  RoomArea * Price[WoodChoice]
// to store the relevant data in Quotations[]
Quotations[CurrentCustomer, 1]  RoomLength
Quotations[CurrentCustomer, 2]  RoomWidth
Quotations[CurrentCustomer, 3]  RoomArea
Quotations[CurrentCustomer, 4]  WoodChoice
Quotations[CurrentCustomer, 5]  WoodCost

// final output of quotation


OUTPUT "Customer name: ", Customers[CurrentCustomer]
OUTPUT "The wood you have chosen is: ",
WoodType[WoodChoice]
OUTPUT "Your total price is: ",
Quotations[CurrentCustomer,5]
// ready for next customer
CurrentCustomer  CurrentCustomer + 1
// resets CurrentCustomer to beginning of array when
array
// limit reached
IF CurrentCustomer > 100
THEN
CurrentCustomer  1
ENDIF
ENDWHILE

© UCLES 2023 Page 12 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2023

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

No creditable At least one programming Some programming The range of


response. technique has been used. techniques used are programming techniques
Any use of selection, appropriate to the used is appropriate to the
iteration, counting, problem. problem.
totalling, input and output. More than one technique All criteria stated for the
seen applied to the scenario have been
scenario, check the list of covered by the use of
techniques needed. appropriate programming
techniques, check the list
of techniques needed.

Some data has been Some of the data The data structures
stored but not structures chosen are chosen are appropriate
appropriately. appropriate and store and store all the data
Any use of variables or some of the data required. required.
arrays or other language More than one data The data structures used
dependent data structures structure used to store store all the data required
e.g. Python lists. data required by the by the scenario.
scenario.

© UCLES 2023 Page 13 of 14


0478/22 Cambridge IGCSE – Mark Scheme October/November
PUBLISHED 2023

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

No creditable Program seen without Program seen with some The program has been
response. relevant comments. relevant comment(s). fully commented.

Some identifier names The majority of identifiers Suitable identifiers with


used are appropriate. used are appropriately names meaningful to their
Some of the data named. purpose have been used
structures used have Most of the data throughout.
meaningful names. structures used have All of the data structures
meaningful names. used have meaningful
names.

The solution is illogical. The solution contains The program is in a


parts that may be illogical. logical order.

The solution is inaccurate The solution contains The solution is accurate.


in many places. parts that are inaccurate. Solution logically performs
Solution contains few Solution contains lines of all the tasks given in the
lines of code with errors code with some errors scenario. Ignore minor
that attempt to perform a that logically perform syntax errors.
task given in the scenario. tasks given in the
scenario. Ignore minor
syntax errors.

The solution attempts at The solution attempts to The solution meets all the
least one of the meet most of the requirements given in the
requirements. requirements. question.
Solution contains lines of Solution contains lines of Solution performs all the
code that attempt at least code that perform most tasks given in the
one task given in the tasks given in the scenario.
scenario. scenario.

© UCLES 2023 Page 14 of 14


Cambridge IGCSE™

COMPUTER SCIENCE 0478/23


Paper 2 Algorithms, Programming and Logic October/November 2023
MARK SCHEME
Maximum Mark: 75

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.

This document consists of 16 printed pages.

© UCLES 2023 [Turn over


0478/23 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
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.

© UCLES 2023 Page 2 of 16


0478/23 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
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.

© UCLES 2023 Page 3 of 16


0478/23 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
Question Answer Marks

1 A 1

Question Answer Marks

2 B 1

Question Answer Marks

3(a) One mark for each correct line from description to pseudocode keyword 4

Pseudocode description Pseudocode keyword

stores data in a file OUTPUT

WRITE
retrieves data from a file

READ
displays data on a screen
OPEN

enters data from a keyboard


INPUT

3(b) One mark for each point (max two) 2


• data is stored permanently
• data can be moved to another computer
• another copy of data can be made and stored//accessed elsewhere // backup copy

© UCLES 2023 Page 4 of 16


0478/23 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
Question Answer Marks

4(a) One mark for each point 2


• type check
• range check

4(b) One mark for each point (max five) 5


• use of loop for check
• checking for whole number
• checking for number greater than or equal to one
• … and less than or equal to six
• Appropriate error/reinput message
• ability to reinput value

Example:
WHILE Seats < 1 OR Seats > 6 OR Seats <> ROUND(Seats, 0) DO
OUTPUT "Please enter a valid number of seats "
INPUT Seats
ENDWHILE

4(c) One mark for correct test data, one mark for corresponding reason 2

Example:
7, abnormal data to show that this value would be rejected

Question Answer Marks

5(a) One mark for each error identified and correction given 3
• Line 06 Password should be NewPassword
• Line 11 AND should be OR
• Line 16 INPUT should be OUTPUT

© UCLES 2023 Page 5 of 16


0478/23 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
Question Answer Marks

5(b) Max six marks from: 6

Max four from:


one mark for data entry with message
one mark for initialisation
one mark for checking list // decision box comparing input
with array
one mark for updating // updating the two variables
position and found
one mark for loop control // second decision box
one mark for setting new password to position in list
one mark for outputs // two outputs

Two marks:
one mark for correct use of flow chart symbols
one mark for correct use arrows and labels

© UCLES 2023 Page 6 of 16


0478/23 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
Question Answer Marks

6(a) One mark for correct gate and one mark for correct truth table 2

AND

A B X

0 0 0

0 1 0

1 0 0

1 1 1

6(b) One mark for correct gate and one mark for correct truth table 2

XOR // EOR

A B X

0 0 0

0 1 1

1 0 1

1 1 0

© UCLES 2023 Page 7 of 16


0478/23 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
Question Answer Marks

6(c) One mark for correct gate and one mark for correct truth table 2

NOR

A B X

0 0 1

0 1 0

1 0 0

1 1 0

6(d) One mark for each correct gate, with the correct input(s) as shown. 5

© UCLES 2023 Page 8 of 16


0478/23 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
Question Answer Marks

7 one mark for first description one mark for matching difference max four 4
• local variables - scope is a defined block of code/subroutine/procedure/function
• global variables – scope is the whole program
• local variables - value cannot be changed elsewhere in the program
• global variables – value can be changed anywhere in the program

© UCLES 2023 Page 9 of 16


0478/23 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
Question Answer Marks

8(a) Accept Reject PartOK Error 5


OUTPUT

0 0

1 Y

2 Y

3 Y

1 N

4 Y

5 Y

6 Y

7 Y

2 N

8 Y

9 Y

10 Y 20

Too many rejected 20% error

One mark for each column

© UCLES 2023 Page 10 of 16


0478/23 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
Question Answer Marks

8(b) One mark for each point max three 3


• after the Input box // before the first decision box
• insert a process box
• to convert the input to upper case
OR
• change the first decision / add another decision box
• to accept 'y' as well
• by adding OR PartOK = 'y'

Question Answer Marks

9(a) Records: 14 2
Fields: 5

9(b)(i) Species/Description 1

9(b)(ii) Long names that could be easily misspelt // species or description could be duplicated 1

9(b)(iii) Easy to validate // always unique 1

9(c) One mark for each correct row or column 2


True silver white laced top half and black lower half
Brown eared brown with ear tufts

9(d) One mark for each correct addition 4


SELECT Species
FROM PheasantList
WHERE Breeding or WHERE Young = 0
AND Young = 0; AND Breeding;

© UCLES 2023 Page 11 of 16


0478/23 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
Question Answer Marks

10 • AO2 (maximum 9 marks) 15


• AO3 (maximum 6 marks)

Data Structures required names shown underlined must be used as given in the scenario
2D Array or list Temperatures
Variables MaxDay, MinDay, AvDay, MaxWeek, MinWeek, AvWeek

Requirements (techniques)

R1 Find maximum and minimum temperatures for each day and calculates the average daily temperature (searching,
totalling)
R2 Find maximum and minimum temperatures for week and calculates the average weekly temperature (nested
searching, totalling)
R3 outputs for each day name, the rounded values for maximum temperature, minimum temperatures and average
temperature. Outputs for the week the rounded values for maximum temperature, minimum temperatures and average
temperature (output with appropriate messages and rounded values)

Example 15-mark answer in pseudocode:

// meaningful identifier names and appropriate data structures to store the data required
DECLARE DayCounter, HourCounter : INTEGER
DECLARE AvDay, AvWeek, MaxDay, MinDay, MaxWeek, MinWeek : REAL
DECLARE DayTotal, WeekTotal : REAL
DECLARE Day : STRING

CONSTANT Hours  24
CONSTANT Days  7

© UCLES 2023 Page 12 of 16


0478/23 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
Question Answer Marks

10 MaxWeek  -1000// initialise max and min temperatures and total for the week
MinWeek  1000
WeekTotal  0

FOR DayCounter  0 TO Days - 1


MaxDay  -1000// initialise max and min temperatures and total for each day
MinDay  1000
DayTotal  0
FOR HourCounter  0 TO Hours - 1
DayTotal  DayTotal + Temperatures(HourCounter, DayCounter)
// update total maximum and minimum
IF Temperatures(HourCounter, DayCounter) > MaxDay
THEN
MaxDay  Temperatures(HourCounter, DayCounter)
ENDIF
IF Temperatures(HourCounter, DayCounter) < MinDay
THEN
MinDay  Temperatures(HourCounter, DayCounter)
ENDIF
NEXT HourCounter

CASE OF DayCounter // select message for day


0 : Day  "Monday"
1 : Day  "Tuesday"
2 : Day  "Wednesday"
3 : Day  "Thursday"
4 : Day  "Friday"
5 : Day  "Saturday"
6 : Day  "Sunday"

ENDCASE

DayAverage  DayTotal / Hours // output results for day


OUTPUT Day // Results from a day
OUTPUT "Maximum temperature ", MaxDay
OUTPUT "Minimum temperature ", MinDay
OUTPUT "Average temperature ", ROUND(DayAverage,2)

© UCLES 2023 Page 13 of 16


0478/23 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
Question Answer Marks

10 IF MaxDay > MaxWeek // update total maximum and minimum


THEN
MaxWeek  MaxDay
ENDIF

IF MinDay > MinWeek


THEN
MinWeek  MinDay
ENDIF
WeekTotal  WeekTotal + DayTotal // update total for week

NEXT DayCounter
WeekAverage  WeekTotal / Days

OUTPUT "Maximum temperature for week ", MaxWeek// output results for week
OUTPUT "Minimum temperature for week ", MinWeek
OUTPUT "Average temperature for Week ", ROUND(WeekAverage,2)

© UCLES 2023 Page 14 of 16


0478/23 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
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

No creditable At least one programming Some programming techniques used The range of programming techniques
response. technique has been used. are appropriate to the problem. used is appropriate to the problem.
Any use of selection, iteration, More than one technique seen All criteria stated for the scenario have
counting, totalling, input and applied to the scenario, check the list been covered by the use of
output. of techniques needed. appropriate programming techniques,
check list of techniques needed.

Some data has been stored but Some of the data structures chosen The data structures chosen are
not appropriately. are appropriate and store some of the appropriate and store all the data
Any use of variables or arrays or data 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.

© UCLES 2023 Page 15 of 16


0478/23 Cambridge IGCSE – Mark Scheme October/November 2023
PUBLISHED
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

No creditable Program seen without relevant Program seen with some relevant The program has been fully
response. comments. comment(s). commented.

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 Most of the data structures used have used throughout.
used have meaningful names. meaningful names. All of the data structures used have
meaningful names.

The solution is illogical. The solution contains parts that may The program is in a logical order.
be illogical.

The solution is inaccurate in The solution contains parts that are The solution is accurate.
many places. inaccurate. Solution logically performs all the
Solution contains few lines of Solution contains lines of code with tasks given in the scenario. Ignore
code with errors that attempt to some errors that logically perform minor syntax errors.
perform a task given in the tasks given in the scenario. Ignore
scenario. minor syntax errors.

The solution attempts at least The solution attempts to meet most of The solution meets all the
one of the requirements. the requirements. requirements given in the question.
Solution contains lines of code Solution contains lines of code that Solution performs all the tasks given in
that attempt at least one task perform most tasks given in the the scenario.
given in the scenario. scenario.

© UCLES 2023 Page 16 of 16


Cambridge IGCSE™

COMPUTER SCIENCE 0478/22


Paper 2 February/March 2022
MARK SCHEME
Maximum Mark: 50

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 February/March 2022 series for most
Cambridge IGCSE™, Cambridge International A and AS Level components and some Cambridge O Level
components.

This document consists of 11 printed pages.

© UCLES 2022 [Turn over


0478/22 Cambridge IGCSE – Mark Scheme February/March 2022
PUBLISHED
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.

© UCLES 2022 Page 2 of 11


0478/22 Cambridge IGCSE – Mark Scheme February/March 2022
PUBLISHED
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.

© UCLES 2022 Page 3 of 11


0478/22 Cambridge IGCSE – Mark Scheme February/March 2022
PUBLISHED
Question Answer Marks

Section A

1(a) Many correct answers, the names used must be meaningful. The names given are examples only. 6
One mark per mark point, max three
Constant name MaxNumberPlayers
Value 4
Why constant used This number will not change whilst the program is running

One mark per mark point, max three


Variable name NumberOfPlayers
Data type Integer/int
Why variable used A value between 2 and 4 inclusive is input and stored at the start of the round

1(b) One mark per mark point, max four 4

MP1 using a FOR … NEXT // REPEAT … UNTIL // DO … WHILE loop


MP2 starting at 1/0 and finishing at 18/17 or 9/8 // 18/9 iterations
MP3 setting the elements in the player scores arrays to zero
MP4 … for all four arrays // number of arrays for players in this round
MP5 setting variables / array for total scores to 0
MP6 use of assignment / append statement(s)

Any programming statements included must be explained.

© UCLES 2022 Page 4 of 11


0478/22 Cambridge IGCSE – Mark Scheme February/March 2022
PUBLISHED
Question Answer Marks

1(c) One mark per mark point, max six 6

MP1 loop through the number of holes played


MP2 for each hole work / loop through the number of players actually playing
MP3 for each player display their name
MP4 … prompt to enter the number of strokes played for the hole
MP5 … input the number of strokes twice
MP6 … validate both inputs are the same
MP7 … store the number of strokes in the appropriate array
MP8 … update the total score for that player
MP9 … prompt and input to ask if the player wants to see the number of strokes played so far
MP10 … check if required then output number of strokes

Example Answer
FOR Hole ← 1 TO NumberOfHoles
FOR Player ← 1 TO NumberOfPlayers
REPEAT
OUTPUT PlayerName[Player], "Please enter the number of strokes played for hole ",
Hole
INPUT NumberStrokes
OUTPUT PlayerName[Player], " please re-enter the number"
INPUT NumberStrokesAgain
UNTIL NumberStrokes = NumberStrokesAgain
IF Player = 1
THEN
Player1[Hole] ← NumberStrokes
Player1Total ← Player1Total + NumberStrokes
OUTPUT "Do you want to see number total of strokes played so far Y/N? "
INPUT SeeTotal
IF SeeTotal = "Y"
THEN
OUTPUT "Total number of strokes so far ", Player1Total
ENDIF
ENDIF
IF Player = 2

© UCLES 2022 Page 5 of 11


0478/22 Cambridge IGCSE – Mark Scheme February/March 2022
PUBLISHED
Question Answer Marks

1(c) THEN
Player2[Hole] ← NumberStrokes
Player2Total ← Player2Total + NumberStrokes
OUTPUT "Do you want to see number total of strokes played so far Y/N? "
INPUT SeeTotal
IF SeeTotal = "Y"
THEN
OUTPUT "Total number of strokes so far ", Player2Total
ENDIF
ENDIF
IF Player = 3
THEN
Player3[Hole] ← NumberStrokes
Player3Total ← Player3Total + NumberStrokes
OUTPUT "Do you want to see number total of strokes played so far Y/N? "
INPUT SeeTotal
IF SeeTotal = "Y"
THEN
OUTPUT "Total number of strokes so far ", Player3Total
ENDIF
ENDIF
IF Player = 4
THEN
Player4[Hole] ← NumberStrokes
Player4Total ← Player4Total + NumberStrokes
OUTPUT "Do you want to see number total of strokes played so far Y/N? "
INPUT SeeTotal
IF SeeTotal = "Y"
THEN
OUTPUT "Total number of strokes so far ", Player4Total
ENDIF
ENDIF
NEXT Player
NEXT Hole

© UCLES 2022 Page 6 of 11


0478/22 Cambridge IGCSE – Mark Scheme February/March 2022
PUBLISHED
Question Answer Marks

1(d) Explanation 4
One mark per mark point, max four

MP1 Work/ Loop through all the total scores


MP2 compare each total score using selection / IF statements // use an appropriate function
MP3 select the score with the lowest value
MP4 … also select the player name for that score
MP5 output the player name and either the difference between par and their score or their score
MP6 compare the score with the lowest value with the value of par using selection / IF statements
MP7 … identify as “over par” if the value is greater than par or output “under par” if the value is less than par or output
“par” if there is no difference

Any programming statements included must be explained.

© UCLES 2022 Page 7 of 11


0478/22 Cambridge IGCSE – Mark Scheme February/March 2022
PUBLISHED
Question Answer Marks

Section B

2(a) One mark per mark point, max four 4


• 100
• AND Age < 12
• Count12to18 + 1
• CountOver18

2(b) One mark suitable IF construct, one mark correct assignment statement, for example 4
IF Age < 7
THEN
CountUnder7 ← CountUnder7 + 1
ENDIF
One mark suitable message, one mark correct use of countUnder7 variable, for example
OUTPUT "There are ", CountUnder7, " students aged under 7."

© UCLES 2022 Page 8 of 11


0478/22 Cambridge IGCSE – Mark Scheme February/March 2022
PUBLISHED
Question Answer Marks

3 One mark for each correct single line from the validation check, max four 4

Validation check Description

checks that the data input is


between two values

length check

checks that the data input is


an integer

check digit

checks that the data input has


three digits

range check

checks that the data has


been input

type check

checks that the data input has


the correct digits

© UCLES 2022 Page 9 of 11


0478/22 Cambridge IGCSE – Mark Scheme February/March 2022
PUBLISHED
Question Answer Marks

4(a) One mark each for columns Number and OUTPUT 6


Two marks for column C first four values (1) last three values (1)
Two marks for column D first six values (1) last four values (1)

Number C D OUTPUT

7 0 3

6 0 3

1 2

2 1 2

5 0 2

4 0 2

1 1 1

-1

4(b) One mark per mark point, max two 2


• to count the factors / the numbers that go into (other than 1 or itself) of a number
• to output the number of factors

© UCLES 2022 Page 10 of 11


0478/22 Cambridge IGCSE – Mark Scheme February/March 2022
PUBLISHED
Question Answer Marks

4(c)(i) One mark per mark point, max two 2


• the value of D becomes zero
• division by zero error
• endless loop

4(c)(ii) One mark per mark point, max two 2


• after the decision box to test if the number is -1
• insert another decision box to test if the number is less than 4 / less than or equal to 3
• return to INPUT Number if true

Question Answer Marks

5 Explanation 6
One mark per mark point, max three
• field, FlowerID, not required / should not be displayed
• Type field not included and displayed
• Fragrance field should not be displayed
• Fragrance criteria should not be Y / should be N
Field: Type Fragrance Style Colour
Table: FLOWER FLOWER FLOWER FLOWER
Sort:
Show:    
Criteria: =N
or:

query-by-example grid
One mark per mark point, max three

• One mark for changing Flower ID to Type


• One mark for changing Criteria in Fragrance to N
• One mark for changing Show in Fragrance to 

© UCLES 2022 Page 11 of 11


Cambridge IGCSE™

COMPUTER SCIENCE 0478/21


Paper 2 Problem Solving and Programming May/June 2022
MARK SCHEME
Maximum Mark: 50

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 2022 series for most
Cambridge IGCSE, Cambridge International A and AS Level and Cambridge Pre-U components, and some
Cambridge O Level components.

This document consists of 13 printed pages.

© UCLES 2022 [Turn over


0478/21 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
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.

© UCLES 2022 Page 2 of 13


0478/21 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
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.

© UCLES 2022 Page 3 of 13


0478/21 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Please note the following further points:

The words in bold in the mark scheme are important text that needs to be present, or some notion of it needs to be present. It does not have to
be the exact word, but something close to the meaning.

If a word is underlined, this exact word must be present.

A single forward slash means this is an alternative word. A double forward slash means that this is an alternative mark point.

Ellipsis (…) on the end of one-mark point and the start of the next means that the candidate cannot get the second mark point without being
awarded the first one. If a mark point has an ellipsis at the beginning, but there is no ellipsis on the mark point before it, then this is just a follow-on
sentence and can be awarded without the previous mark point.

© UCLES 2022 Page 4 of 13


0478/21 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

Section A

1(a) One mark per mark point, max five 5

Data Structure(s), max two


MP1 arrays
MP2 variable(s) / constant(s)
Further description, max three
MP3 name(s) one or more
MP4 sample data for appropriate arrays or variables
MP5 use(s) one or more
Additional data structure description using the same data structure type, max one
MP6 two or more full descriptions of the data structure including name, sample data and use

For example:
An array (1) named FirstName (1) to store the first names of the members (1) such as James (1). A variable (1) could also
be used to enter whether or not they wish to volunteer. (5 marks)

A variable (1) named FirstName (1) to input the first names of the members (1) such as James (1). A variable could also be
used to enter whether or not they wish to volunteer, with sample data of ‘yes’ (1). (5 marks)

Task 1 – becoming a member of Friends of Seaview Pier


Set up a system to enable people to become members of Friends of Seaview Pier and for each new member enter:
 their first name and last name
 whether or not they wish to work as a volunteer
– if they choose to volunteer, identify the area from:
o the pier entrance gate
o the gift shop
o painting and decorating
 the date of joining
 whether or not they have paid the $75 fee.
All of this information needs to be stored using suitable data structures.

© UCLES 2022 Page 5 of 13


0478/21 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

1(b) Explanation of how each was done. Code is allowed, but must be fully explained. 3

One mark per mark point, max three

MP1 add/use a (new) variable/array to total the membership fee money // total number of members who have paid
MP2 initialise the totalling variable to 0 at the start of the program
MP3 check whether the new member has paid the $75 fee using a conditional statement
MP4 …if they have paid, and the amount paid is being totalled, add 75 to the current running total of the membership
fee total
MP5 …if they have paid, and the number of paid members is being totalled, add 1 to the total number of members who
have paid
MP6 …if they have paid, and the number of paid members is being totalled, multiply total by 75, to give total paid.

1(c) Any code must include a description of what it is for. 3

One mark per mark point, max three


Max two for just naming different appropriate validation checks

MP1 apply a presence check // to ensure that data has been entered (to the question do you want to work as a
volunteer?)
MP2 apply a type check // to ensure that data has been entered of the correct data type e.g. integer if the response
required is 1 or 0
MP3 checking the valid inputs would be either yes or no // apply a check to ensure that the data matches the expected
input
MP4 the valid inputs would be to choose in which area the new member wishes to volunteer e.g. a list of areas
MP5 if input is not valid, an error message is output (and a new input is requested)
MP6 if input is valid, the program continues

© UCLES 2022 Page 6 of 13


0478/21 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

1(d) One mark per mark point, max five 5


MP1 input for sponsor’s name / name taken from previous data // input for message on plaque
MP2 both inputs correct with appropriate prompts // input for message on plaque correct with appropriate prompt and
name taken from previous data
MP3 output of input(s) for confirmation …
MP4 … method for sponsor to confirm that the input(s) are correct
MP5 method to enable re-entry of message on plaque if errors made
MP6 charge of $200 acknowledged / charged / confirmed / displayed
MP7 (name and) message stored in arrays
MP8 array index incremented for next sponsor

Task 3 – sponsoring a wooden plank


Add an additional option to the program in Task 1 to enable the pier’s wooden planks to be sponsored. Separate data
structures should be used to store the names of the individuals and the short messages they would like to have written on
their brass plaque. An output would display everything that was input for the sponsor to confirm. If errors are found, the
program should allow data to be re-entered. Once complete, the data is stored and the sponsor is charged $200.

Example answer
ArrayIndex  0 //initial array's index
Check  "N"
WHILE Check <> "Y"
OUTPUT "Enter your name"
INPUT Name
OUTPUT "Enter the message you would like on your brass plaque"
INPUT Message
OUTPUT "The data you have entered is, name: ", Name, " and your
message for the plaque is: ", Message
OUTPUT "Is this correct (Y or N)"
INPUT Check
IF Check <> "Y"
THEN
OUTPUT "The data entered is incorrect, please re-enter"
ENDIF
ENDWHILE

© UCLES 2022 Page 7 of 13


0478/21 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

1(d) PlankName[ArrayIndex]  Name


Message[ArrayIndex]  Message
ArrayIndex  ArrayIndex + 1
OUTPUT "The fee for this service is $200"
//some method of paying the fee or acknowledgement of the fee

1(e) Explanation of how each was done. Code is allowed, but must be fully explained. 4

One mark per mark point, max four

MP1 a menu is provided/options are displayed so that the user can choose which of the lists they wish to see
MP2 the user inputs a number/code as shown on the menu corresponding to their menu choice
MP3 attempt to validate input
MP4 … if it does not match an option, give an error message and ask for re-input
MP5 … if it matches an option, a range of IF statements/conditional statements/CASE statement are/is used to
compare the input with the available options
MP6 … output the chosen list e.g. using a loop to output the contents of the appropriate first and second name arrays
corresponding to the user input
MP7 identification of empty list and appropriate action

Task 2 – using the membership data


Extend the program in Task 1 so that a list of the first and last names of members can be output in any of the following
categories:
 Members who have chosen to work as volunteers.
 Volunteers who would like to work at the pier entrance gate.
 Volunteers who would like to work in the gift shop.
 Volunteers who would like to help with painting and decorating tasks.
 Members whose membership has expired (they have not re-joined this year).
 Members who have not yet paid their $75 fee.

© UCLES 2022 Page 8 of 13


0478/21 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

Section B

2 Four marks for five correct rows 4


Three marks for four correct rows
Two marks for three correct rows
One marks for two correct rows

Data type
Description
Boolean Char Integer Real String

a single character from the keyboard 

multiple characters from the keyboard 

only one of two possible values 

only whole numbers 

any number 

Question Answer Marks

3 One mark per mark point, max four 4

 Normal test data computerscience@[Link]


 Reason this is a valid email address (containing the @ symbol) and should be accepted

 Erroneous test data computerscienceisgreat


 Reason this is just a string, and should be rejected (as an email address needs a single ’@’)

© UCLES 2022 Page 9 of 13


0478/21 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

4(a) One mark per mark point, max six 6

MP1 input box


MP2 correct check of Score
MP3 assign Score to Pass correctly
MP4 assign Score to Fail correctly
MP5 increment both array counters
MP6 correct check of number of scores

START

PassCount  0

FailCount  0

Count  0

INPUT
Score

Yes IS Score >= No


50?

Pass[PassCount]  Score Fail[FailCount]  Score

PassCount  PassCount + 1 FailCount  FailCount + 1

Count  Count + 1

No IS Count =
60?

Yes
END

© UCLES 2022 Page 10 of 13


0478/21 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

4(b) One mark per mark point, max four 4

MP1 appropriate conditional loop structure


MP2 correct identification of invalid input
MP3 appropriate error message
MP4 repeated input of score until correct

WHILE Score < 0 OR Score > 100 (DO)


OUTPUT "Your entry must be between 0 and 100, inclusive, please try again "
INPUT Score
ENDWHILE

Or:

REPEAT
IF Score < 0 OR Score > 100
THEN
OUTPUT "Your entry must be between 0 and 100, inclusive, please try again "
INPUT Score
ENDIF
UNTIL Score >= 0 AND Score <= 100

© UCLES 2022 Page 11 of 13


0478/21 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

5(a) One mark per mark point, max five 5

MP1 correct Counter and Limit columns


MP2 correct Value column
MP3 correct First column
MP4 correct Last column
MP5 correct OUTPUT

Counter Value First Last Limit OUTPUT

0 0 8

1 66

2 606 6 6 606

3 6226

4 8448

5 642 6 2

6 747 7 7 747

7 77

8 121 1 1 121

© UCLES 2022 Page 12 of 13


0478/21 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

5(b) One mark per mark point, max two 2


 checks for / outputs 3-digit numbers
 … where the first and last digit are the same

Question Answer Marks

6(a) 8 1

6(b) The primary key field must be unique/different for each record in the table 1

6(c) One mark per mark point, max three 3

 correct fields and table named correctly


 correct sort and show box rows
 correct search criteria

Field: GameID GameName GamePrice NumberStock OnOrder

Table: GAMES GAMES GAMES GAMES GAMES

Sort: Ascending

Show:     

Criteria: =0 ="Y"

or:

© UCLES 2022 Page 13 of 13


Cambridge IGCSE™

COMPUTER SCIENCE 0478/22


Paper 2 Problem-solving and Programming May/June 2022
MARK SCHEME
Maximum Mark: 50

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 2022 series for most
Cambridge IGCSE, Cambridge International A and AS Level and Cambridge Pre-U components, and some
Cambridge O Level components.

This document consists of 12 printed pages.

© UCLES 2022 [Turn over


0478/22 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
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.

© UCLES 2022 Page 2 of 12


0478/22 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
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.

© UCLES 2022 Page 3 of 12


0478/22 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Please note the following further points:

The words in bold in the mark scheme are important text that needs to be present, or some notion of it needs to be present. It does not have to
be the exact word, but something close to the meaning.

If a word is underlined, this exact word must be present.

A single forward slash means this is an alternative word. A double forward slash means that this is an alternative mark point.

Ellipsis (…) on the end of one-mark point and the start of the next means that the candidate cannot get the second mark point without being
awarded the first one. If a mark point has an ellipsis at the beginning, but there is no ellipsis on the mark point before it, then this is just a follow-on
sentence and can be awarded without the previous mark point.

© UCLES 2022 Page 4 of 12


0478/22 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED

Question Answer Marks

Section A

1(a)(i) Many correct answers, the name used must be meaningful. The name given is an example only. 3
One mark per mark point, max three
Constant AdultCostOneDay
Value 20.00
Use Storing the cost of an adult ticket for one day

1(a)(ii) Many correct answers, the name used must be meaningful. The name given is an example only. 3
One mark per mark point, max three
Variable NumberOfTickets // NumberOfAdultTickets
Data type Integer
Use Inputting the number of tickets purchased // Inputting the number of adult tickets purchased

1(b) One mark per mark point, max three 3

MP1 using an array or variables // lookup // input today’s date


MP2 use a loop / FOR / REPEAT / WHILE statement
MP3 … to output / display today’s date / today using a suitable message
MP4 … and the 6/7 following dates/days // loop 6/7 times

or

MP5 using an array or variables // lookup // input today’s date


MP6 array/ variables contains all the days of the week / the next seven days or dates
MP7 attempt to output / display available days using a suitable message(s)

1(c) One mark per mark point, max two 2


MP1 method used to allocate a new number, e.g. initialise a variable or counter // select a random number
MP2 how it ensured uniqueness, e.g. every booking number is one larger than the previous number
// check existing bookings to ensure it hasn’t been used before

© UCLES 2022 Page 5 of 12


0478/22 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

1(d) One mark per mark point, max six 6

MP1 initialise a running total for the cost of the booking


MP2 input (with prompt) the number of tickets
MP3 … attempt to identify type of ticket
MP4 … add the cost of tickets to the running total
MP5 ability to book several types of ticket
MP6 attempt to check that the number of children booked is less than or equal to twice the number of adults
MP7 attempt to identify type of attraction
MP8 input with prompt the number of selected attractions required
MP9 … check that this number is not greater than the total number of tickets booked
MP10 … add the cost of the attractions to the (running) total

Example answer
TotalCost  0
TotalPeople  0
OUTPUT "Do you want single tickets? Y/N"
INPUT Single
IF Single = "Y"
THEN
FOR Type  1 TO 3 // adults, children and seniors
REPEAT
Flag  True
OUTPUT "How many ",TicketDecription[Type], " tickets"
INPUT NumberOfTickets[Type]
IF Type = 2
THEN
IF NumberOfTickets[2] > 2 * NumberOfTickets[1]
THEN
Flag  FALSE
OUTPUT "Too many children"
ENDIF
ENDIF
UNTIL NumberOfTickets[Type] >= 0 AND Flag
TotalCost  TotalCost + TicketPrice[Type] * NumberOfTickets[Type]

© UCLES 2022 Page 6 of 12


0478/22 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

1(d) TotalPeople  TotalPeople + NumberOfTickets[Type]


NEXT Type
ENDIF
OUTPUT "Do you want a family ticket? Y/N"
INPUT Family
IF Family = "Y"
THEN
OUTPUT "How many?"
INPUT NumberOfTickets[4]
TotalCost  TotalCost + TicketPrice[4] * NumberOfTickets[4]
TotalPeople  TotalPeople + NumberOfTickets[4] * 5
ENDIF

OUTPUT "Do you want a group ticket? Y/N"


INPUT Group
IF Group = "Y"
THEN
OUTPUT "How many people in the group?"
INPUT NumberOfTickets[5]
TotalCost  TotalCost + TicketPrice[5] * NumberOfTickets[5]
TotalPeople  TotalPeople + NumberOfTickets[5]
ENDIF

REPEAT
OUTPUT "How many people would like to see the lion feeding?"
INPUT LionFeedingNumber
IF TotalPeople >= LionFeedingNumber
THEN TotalCost  TotalCost + LionFeedingNumber * LionfeedingPrice
ENDIF
OUTUT "How many people would like to see the penguin feeding?"
INPUT PenguinFeedingNumber
IF TotalPeople >= PenguinFeedingNumber
THEN TotalCost  TotalCost + PenguinFeedingNumber * PenguinfeedingPrice
ENDIF
UNTIL TotalPeople >= PenguinFeedingNumber AND TotalPeople >= LionFeedingNumber

© UCLES 2022 Page 7 of 12


0478/22 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

1(e) Explanation 3
One mark per mark point, max three
MP1 use of selection (or any other method) to identify bookings with 2 or more adults and/or seniors and 2 (allow 3) or
more children
MP2 calculating new price including family ticket(s) for booking / tickets sold
MP3 … use of condition to compare price of family ticket(s) to price of ordinary tickets / group ticket(s) …
MP4 … identifying best value / lowest cost

© UCLES 2022 Page 8 of 12


0478/22 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

Section B

2(a) One mark per mark point, max three 3


 line 8 / PassCheck  TRUE
correction PassCheck  FALSE
 line 12 / IF Password <> Password
correction IF Password2 <> Password // IF Password <> Password2
 line 18 / UNTIL PassCheck OR Attempt <> 3
correction UNTIL PassCheck OR Attempt = 3 / UNTIL PassCheck OR Attempt >= 3

2(b) One mark check, one mark matching description, max four 4
Check: validation // length check
Description length check // checks number of characters in password
Check: verification // double entry
Description double entry // comparison that two inputs are the same

2(c) One mark per set, one mark matching reason, max four 4
Set 1 – any appropriate example e.g. “small”
Reason must follow through from the password given e.g. abnormal data will be rejected
Set 2 – any different appropriate example e.g. “password” and “password”
Reason must be different and follow through from the password given e.g. normal data will be accepted

Question Answer Marks

3(a) One mark per mark point, max two 3


 a list / one column of items
 … of the same data type
 … stored under a single identifier
 … with a single index to identify each element

One mark for an example of a declaration


 example e.g. DECLARE MyArray[1:10] OF INTEGER

© UCLES 2022 Page 9 of 12


0478/22 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

3(b) One mark per mark point, max two 2


 using a counter to index the array
 so that the same code can be repeatedly used to check every element // every element can be checked in a loop

Question Answer Marks

4(a) One mark for each correct column 7


Counter Hot Cold Serve Temp Error OUTPUT

0 0 0 0

1 1 75

2 2 78

3 3 84

4 1 87 Too Hot

5 2 91 Too Hot

6 4 80

7 5 75

8 6 70

9 7 65

10 1 62 Too Cold

-1 30 30

© UCLES 2022 Page 10 of 12


0478/22 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

4(b)  include a message to explain the value output / e. g. “The percentage of meals not served” // 1
outputting Hot, Cold and Serve

4(c)  updating the Serve variable // Serve  Serve + 1 1

© UCLES 2022 Page 11 of 12


0478/22 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

5(a) One mark per mark point, max four 4


 correct rows Field and Table
 correct row Show
 correct Criteria for SingleUse or/and Uses
 correct Criteria for StockLevel less than ReorderLevel

Field: ItemNumber Description SingleUse StockLevel

Table: NURSE NURSE NURSE NURSE

Sort:

Show:    

Criteria: True <[ReorderLevel]

or:

Or
Field: ItemNumber Description Uses StockLevel

Table: NURSE NURSE NURSE NURSE

Sort:

Show:    

Criteria: =1 <[ReorderLevel]

or:

5(b) the field Uses already shows this information // duplication of data // redundant data 1

© UCLES 2022 Page 12 of 12


Cambridge IGCSE™

COMPUTER SCIENCE 0478/23


Paper 2 Problem Solving and Programming May/June 2022
MARK SCHEME
Maximum Mark: 50

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 2022 series for most
Cambridge IGCSE, Cambridge International A and AS Level and Cambridge Pre-U components, and some
Cambridge O Level components.

This document consists of 13 printed pages.

© UCLES 2022 [Turn over


0478/23 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
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.

© UCLES 2022 Page 2 of 13


0478/23 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
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.

© UCLES 2022 Page 3 of 13


0478/23 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Please note the following further points:

The words in bold in the mark scheme are important text that needs to be present, or some notion of it needs to be present. It does not have to
be the exact word, but something close to the meaning.

If a word is underlined, this exact word must be present.

A single forward slash means this is an alternative word. A double forward slash means that this is an alternative mark point.

Ellipsis (…) on the end of one-mark point and the start of the next means that the candidate cannot get the second mark point without being
awarded the first one. If a mark point has an ellipsis at the beginning, but there is no ellipsis on the mark point before it, then this is just a follow-on
sentence and can be awarded without the previous mark point.

© UCLES 2022 Page 4 of 13


0478/23 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

Section A

1(a) Many correct answers, the names used must be meaningful. The names given are examples only. 4
One mark per mark point, max four

 Variable ClientName
 Use Storing the name of the person making the booking

 Array BookingsLarge[ ]
 Use Storing the bookings for the large meeting room

Task 1 – setting up a booking system structure for the meeting rooms


Set up suitable data structures for each of the three meeting rooms to store:
 when it is booked during a fixed eight-week period
 the client’s name (the person making the booking)
 a unique booking code
 the cost of the booking.

Task 2 – booking a meeting room


Extend the program in Task 1 to enable bookings to be made so that the client enters their name, the meeting room
required and the day of the booking. After the data has been entered, the program should check if the requested day is
available for the required meeting room and if not, the client should be allowed to enter an alternative day or exit the
program.

If the requested day is available, the booking details and cost of the booking should be output for the client to confirm.
Once confirmed, a unique booking code should be generated and stored in both the appropriate meeting room data
structure and the unique booking code data structure. The client’s name and cost of the booking should be stored in the
appropriate data structures set up in Task 1.

Bookings of more than one day must be entered as separate single day bookings.

© UCLES 2022 Page 5 of 13


0478/23 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

1(b) One mark per mark point, max two 2

MP1 input a piece of normal test data that should be accepted // use Large, Small1 or Small2 to check that these data
are accepted // use a menu and check the input matches the available options
MP2 Input a piece of erroneous test data that should be rejected // entry of anything that is not Large, Small1 or Small2
should be rejected // anything not on the menu should be rejected

Explanation Task 2

1(c) One mark per mark point, max four 4

MP1 introduce a (new) variable/array for the number of days for the booking // introduce a (new) variable/array for the
number of days for booking the same room // identify the number of days the same room has been booked by the
same client
MP2 use a conditional/IF statement to check if the length of the booking is 2 to 6 inclusive / 2, 3, 4, 5, or 6 //Use a
CASE statement
MP3 … if it is, get the daily rate for the room booking
MP4 … multiply the number of days for the booking by the room rate
MP5 … multiply the total cost of the booking by 70%/.7// reduce the total cost by 30%

Explanation Task 2

© UCLES 2022 Page 6 of 13


0478/23 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

1(d) One mark per mark point, max six 6

MP1 output all relevant input data using suitable variables for client name, meeting room choice, the booking day and
the booking cost
MP2 attempt to provide appropriate messages to accompany given output
MP3 input with messages to confirm booking
MP4 conditional statement or WHILE to check for a positive confirmation input
MP5 attempt at generation of booking code
MP6 fully unique booking code generated
MP7 identification of meeting room using CASE or IF statements
MP8 storage of booking code in both meeting room and booking code arrays/lists
MP9 storage of client name and booking cost in appropriate arrays/lists

Relevant parts of Task 2 for this question:


 output the booking details and cost of the booking
 take confirmation from client
 generate a unique booking code
 store the booking details.

Assume the booking is for a single day and the requested booking day is available.

Example answer
//Assume variables representing the current index position for the client //related
arrays, ClientIndex, and index for date related arrays, //DateIndex, have been used
OUTPUT "Your name is ", ClientName, Meeting Room ", MeetingRoom,
" starting on ", StartDay, " cost of booking ", BookingCost
OUTPUT "Is this correct (Y or N)"
INPUT Confirm
IF Confirm = "Y"
THEN
BookingCode  BookingCode + 1
CASE OF MeetingRoom
'Lg': MeetingLarge[DayIndex]  BookingCode
'S1': MeetingSmall1[DayIndex]  BookingCode
'S2': MeetingSmall2[DayIndex]  BookingCode

© UCLES 2022 Page 7 of 13


0478/23 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

1(d) ENDCASE
BookingCode[ClientIndex]  BookingCode
ClientName[ClientIndex]  ClientName
BookingCost[ClientIndex]  BookingCost
//No ELSE clause is specified in the task or the question
//so, ignore it if one is given
ENDIF

1(e) One mark per mark point, max four 4

MP1 select the room whose records are to be searched // input the room whose records are to be searched
MP2 use a suitable loop (to search through the array that stores the bookings data for that room)
MP3 use an IF statement/conditional statement to check if the current array element has a booking
MP4 … if not, use the array index to output the day represented
MP5 check each element in the array until all array elements have been checked

Task 3 – using the booking data


Extend the program in Task 1 and Task 2 to make use of the data that is available, to:
 select a meeting room and output the days when it is free
 total and output the amount of money currently taken for all three meeting rooms
 check the bookings for a specific client.

Only the first bullet point required for this question.

© UCLES 2022 Page 8 of 13


0478/23 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

Section B

2 One mark per row, max four 4

Types of test data


Description
Boundary Erroneous / Extreme Normal
Abnormal

test data that is always on the limit of



acceptability

test data that is either on the limit of


acceptability or test data that is just 
outside the limit of acceptability

test data that will always be rejected 

test data that is within the limits of


acceptability  

Question Answer Marks

3 One mark per mark point, max four 4

 variables are used to represent values that can change during the execution of a program // variables can be used to
store the results of calculations / counting / totalling // can store values entered by the user
 variable example – any data that is input into a program such as a date
 constants represent values that must stay the same throughout the execution of a program
 constant example – any value that does not change, such as Pi in mathematical formulae

© UCLES 2022 Page 9 of 13


0478/23 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

4(a) One mark per mark point, max seven 7


MP1 correct In column
MP2 correct Logic column
MP3 correct Test column
MP4 correct Number column
MP5 correct Store[Count] column
MP6 correct Count and Limit columns
MP7 correct Out and OUTPUT columns

Store
In Logic Test Number Count Limit Out OUTPUT
[Count]
0 5
1 TRUE 2 9
3
FALSE
2 TRUE 2 5
3 5 1
3 TRUE 2 8
FALSE
4 TRUE 2 10
FALSE
5 TRUE 2 7
3 7 2 0 5
1 7

© UCLES 2022 Page 10 of 13


0478/23 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

4(b) One mark per mark point, max two 2


 to find / output prime numbers
 … store prime numbers in an array

4(c) One mark per mark point, max three 3

MP1 insert a WHILE loop … // pre-condition loop


MP2 … after Input Number
MP3 … with a condition to enter the loop Number < 3
MP4 an error message included within the loop to ask for a re-entry of Number
MP5 …with another input prompt for Number
MP6 ENDWHILE closes the loop and the program carries on from REPEAT in the original algorithm

OR

One mark per mark point, max three

MP1 insert a REPEAT loop … // post-condition loop


MP2 … before Input Number
MP3 a conditional statement should be placed after Input Number
MP4 …to check if Number < 3
MP5 if the number entered is <3, an error message included within the loop to ask for a re-entry of Number
MP6 UNTIL Number >= 3 closes the loop and the program carries on from REPEAT in the original algorithm

© UCLES 2022 Page 11 of 13


0478/23 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

5 One mark per mark point, max six 6


MP1 input box
MP2 correct totalling using Total
MP3 correct counting using Counter
MP4 correct conditional statement for Counter
MP5 correct calculation of Average
MP6 correct outputs of Total and Average
START

Total  0

Counter  0

INPUT Number

Total  Total + Number

Counter  Counter + 1

No IS Counter =
100?

Yes
Average  Total / Counter

OUTPUT Total

OUTPUT Average

END

© UCLES 2022 Page 12 of 13


0478/23 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

6(a) Larger 1

6(b) One mark per mark point, max three 3

 correct fields correctly named and table names


 correct sort and show box rows
 correct search criteria

Field: PlanetName Larger YearLength

Table: PLANETS PLANETS PLANETS

Sort: Ascending

Show:     

Criteria: Yes >365

or:

© UCLES 2022 Page 13 of 13


Cambridge IGCSE™

COMPUTER SCIENCE 0478/21


Paper 2 Problem-solving and Programming October/November 2022
MARK SCHEME
Maximum Mark: 50

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 2022 series for most
Cambridge IGCSE™, Cambridge International A and AS Level components and some Cambridge O Level
components.

This document consists of 9 printed pages.

© UCLES 2022 [Turn over


0478/21 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
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.

© UCLES 2022 Page 2 of 9


0478/21 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
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.

Please note the following further points:

The words in bold in the mark scheme are important text that needs to be present, or some notion of it needs to be present. It does not have to
be the exact word, but something close to the meaning.

If a word is underlined, this exact word must be present.

A single forward slash means this is an alternative word. A double forward slash means that this is an alternative mark point.

Ellipsis (…) on the end of one-mark point and the start of the next means that the candidate cannot get the second mark point without being
awarded the first one. If a mark point has an ellipsis at the beginning, but there is no ellipsis on the mark point before it, then this is just a follow-on
sentence and can be awarded without the previous mark point.

© UCLES 2022 Page 3 of 9


0478/21 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

Section A

1(a)(i) Many correct answers, the names used must be meaningful. The names given are examples only. 5

One mark per mark point, max five

MP1 name one e.g. Name, Age, Gender, Type, TeamMember, AnnualFee, Paid
MP2 one appropriate data type must match name e.g. string, integer, char, string, Boolean, real, Boolean
MP3 sample data for one appropriate array
MP4 all arrays mentioned have appropriate names
MP5 all arrays mentioned have appropriate data types
MP6 sample data for all arrays e.g. Sue, 9, F, Junior, True, 9.00, False

1(a)(ii) One mark per mark point, max two 2

MP1 use a loop e.g. FOR…NEXT / REPEAT…UNTIL / WHILE…DO


MP2 to input the values for each element in every array
MP3 append each value input to the end of the array

1(b) One mark per mark point, max two 2

MP1 use a loop/ FOR/REPEAT/WHILE to check all members


MP2 use a conditional statement / IF to see if the paid field is marked as False
MP3 only transfer the data of those members whose paid field is marked as True to a set of new arrays
// delete the details of the members who have not paid

© UCLES 2022 Page 4 of 9


0478/21 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

1(c) One mark per mark point, max six 6

MP1 loop through all the members


MP2 any suitable correct comparison of age
MP3 if 18 Change membership type to adult
MP4 if 50 Change membership type to senior
MP5 if 80 Change membership type to golden
MP6 check if team member
MP7 no store appropriate full fee
MP8 yes store 90% of appropriate full fee

Example
FOR Member  1 TO Total
CASE Age[Member] OF
18 : Type[Member]  "Adult"
50 : Type[Member]  "Senior"
80 : Type[Member]  "Golden"
ENDCASE

IF Team[Member]
THEN
CASE Type[Member] OF
"Junior" : Fee[Member]  JuniorFee * 0.9
"Adult" : Fee[Member]  AdultFee * 0.9
"Senior" : Fee[Member]  SeniorFee * 0.9
ENDCASE
ELSE
CASE Type[Member] OF
"Junior" : Fee[Member]  JuniorFee
"Adult" : Fee[Member]  AdultFee
"Senior" : Fee[Member]  SeniorFee
"Golden" : Fee[Member]  GoldenFee
ENDCASE
ENDIF
NEXT Member
© UCLES 2022 Page 5 of 9
0478/21 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

1(d) Explanation 5

One mark per mark point, max five

MP1 how the program checked all the members // use of loop
MP2 how the program identified a member who has not paid their (annual) fee // use of condition
MP3 how the program kept a running total of members who have not paid their (annual) fees
MP4 for each of the three types of membership that require a fee // excluding golden members
MP5 how the program calculated a percentage for members who had not paid…
MP6 for each of the three types of membership that require a fee
MP7 how the program displayed a percentage for members who had not paid
MP8 all three percentages displayed with suitable messages

Programming statements when used must be explained.

Question Answer Marks

Section B

2(a) One mark per mark point, max six 6

• Line 1 100
• Line 7 Value > 100 // Value >= 101
• Line 11 Reading[Value] + 1
• Line 14 INPUT Value
• Line 18 Reading[Count]
• Line 19 Count – 1

© UCLES 2022 Page 6 of 9


0478/21 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

2(b) One mark per mark point, max three 3

• use an IF/conditional statement


• to check if Reading[Count] not equal to zero
• before outputting the value // between statements 17 and 18 // code sample showing position

IF Reading[Count] <> 0
THEN
OUTPUT
ENDIF

Question Answer Marks

3(a) Two marks per check, description must match name of check if given, max six 6

• Check 1 use a type check


o to ensure that the value is a number / integer
• Check 2 use a length check
o to ensure that there are only 4 characters / digits
• Check 3 use a range check
o to ensure that the value is >= 1000 and <=9999

3(b) One mark per mark point, max three 3

MP1 input the new PIN


MP2 input the new PIN again // ask the user to check the number on screen
MP3 check that both PINs are the same // confirm that it is the PIN to use
MP4 check that the new PIN is not the same as the old PIN

© UCLES 2022 Page 7 of 9


0478/21 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

4(a) One mark for each correct column, max four 4


Sold Stock Total OUTPUT

50 0

24 26 24

12 14 Add new stock

64 36

6 58 42

30 28 72

12 16 Add new stock

66 84

18 48 102

-1 102

4(b) One mark for identification of error, max one 3

• the stock level will fall below zero / become negative

One mark per mark point, max two

• before subtracting the amount Sold from Stock


• test that the stock level / Stock is greater than the rolls to be sold / Sold
• provide a suitable error message / ask to re-input

© UCLES 2022 Page 8 of 9


0478/21 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

5(a) One mark per mark point, max two 2

• ItemCode
• uniquely identifies each item

5(b) One mark per mark point, max three 3

• correct rows Field, Table and Sort


• correct row Show
• correct Criteria row <10 or <=9

Field: ItemCode Manufacturer Level

Table: WAREHOUSE WAREHOUSE WAREHOUSE

Sort:

Show:    

Criteria: <10

or:

© UCLES 2022 Page 9 of 9


Cambridge IGCSE™

COMPUTER SCIENCE 0478/22


Paper 2 Problem-solving and Programming October/November 2022
MARK SCHEME
Maximum Mark: 50

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 2022 series for most
Cambridge IGCSE™, Cambridge International A and AS Level components and some Cambridge O Level
components.

This document consists of 15 printed pages.

© UCLES 2022 [Turn over


0478/22 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
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.

© UCLES 2022 Page 2 of 15


0478/22 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
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.

Please note the following further points:

The words in bold in the mark scheme are important text that needs to be present, or some notion of it needs to be present. It does not have to
be the exact word, but something close to the meaning.

If a word is underlined, this exact word must be present.

A single forward slash means this is an alternative word. A double forward slash means that this is an alternative mark point.

Ellipsis (…) on the end of one-mark point and the start of the next means that the candidate cannot get the second mark point without being
awarded the first one. If a mark point has an ellipsis at the beginning, but there is no ellipsis on the mark point before it, then this is just a follow-on
sentence and can be awarded without the previous mark point.

© UCLES 2022 Page 3 of 15


0478/22 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED

Question Answer Marks

Section A

1(a)(i) Many correct answers, the name used must be meaningful. The name given is an example only. 2
One mark per mark point, max two

• Constant NumberDays …
• Value … 14

Task 1 – setting up the booking system


Set up suitable data structures to store the car licence numbers and names of visitors who have booked car parking
spaces. The data structures should have sufficient capacity to store data for each of the 20 parking spaces for a static
period of two weeks. Allow a visitor to request a parking space on any day within the two-week period by entering a
number between 1 and 14, inclusive. The system will check that there are spaces available on the day requested, and if
so, will ask the visitor to enter their name and car licence number. This data will be stored in the data structures
representing the first available parking space for the day requested. The visitor will be told the number of their parking
space.

At the end of the two-week period, allow all of the data to be deleted ready for the next two-week period.

1(a)(ii) Many correct answers, the name used must be meaningful. The name given is an example only. 2

One mark per mark point, max two

• Array LicenceNumbers …
• Use … storing the licence numbers of the cars to be parked

© UCLES 2022 Page 4 of 15


0478/22 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

1(b) One mark per mark point, max two 3

MP1 use a (range) check to check for values between 1 and 14


MP2 use a (type) check to ensure an integer is entered
MP3 … using an (appropriate) IF/conditional statement
MP4 outputs an error message if a new input is required
MP5 re-enter data using WHILE/REPEAT loop until a valid entry has been made

One mark
MP6 appropriate line of code / construct to answer the question

Example code
INPUT Day
WHILE Day < 1 OR Day > 14 DO
OUTPUT "You must enter a number between 1 and 14 inclusive"
INPUT Day
ENDWHILE

© UCLES 2022 Page 5 of 15


0478/22 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

1(c) One mark per mark point, max six 6

MP1 input for day number or to choose accessible parking …


MP2 … both inputs with appropriate prompts
MP3 conditional statement to check if accessible parking is required
MP4 initialisation of variable for the first accessible space
MP5 checking if current array element is an available space
MP6 correct loop to check all array elements for the day
MP7 … until an available space is found (or not)
MP8 input car licence number and name (with or without prompts)
MP9 … and store them in the correct array position(s)
MP10 appropriate output for space available or no space available
MP11 appropriate output for allocated parking space details

Task 2 – adding accessible parking spaces


The visitor car park booking system is to be re-designed to offer accessible parking. Spaces 1 to 5 are named accessible
spaces. Spaces 6 to 20 are named general spaces.

Extend your program in Task 1 so that:


• when a visitor requests a parking space, they are additionally asked if they need an accessible space
– if so, they are allocated the first available space beginning at space 1 and finishing at space 20
– if not, they are allocated the first available space beginning at space 20 and finishing at space 6.
The system must work so that visitors requiring accessible parking may be allocated any of the 20 spaces, but visitors who
do not need accessible parking may only be allocated general spaces.

© UCLES 2022 Page 6 of 15


0478/22 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

1(c) Example answer

//Assume LicenceNumber array has been initialised with the null string
OUTPUT "Enter the number of the day in which you require parking "
INPUT Day
OUTPUT "Do you require an accessible space? (Y or N)"
INPUT Accessible
IF Accessible = "Y"
THEN
SpaceAllocated  FALSE
Space  (Day - 1) * 20
REPEAT
IF LicenceNumbers[Space] = ""
THEN
OUTPUT "Enter your car licence number "
INPUT LicenceNumbers[Space]
SpaceAllocated  TRUE
ENDIF
Space  Space + 1
UNTIL SpaceAllocated OR Space = (Day - 1) * 20 + 20
IF NOT SpaceAllocated
THEN
OUTPUT "No space available"
ELSE
OUTPUT "You are allocated space: ", Space – (Day – 1) * 20
ENDIF
ENDIF

© UCLES 2022 Page 7 of 15


0478/22 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

1(d) Explanation of how the following could be done: 3

One mark per mark point, max three

MP1 change the max constant to 560 / 28


MP2 change the output message for the user to say that the range of days entered must be from 1 to 28
MP3 alter the validation to allow an input of 1 to 28
MP4 change the size of the array that stores licence numbers / names so that it can hold the additional data
MP5 ensure that all loops that access the stored data for retrieval or erasing of data include the new full range

1(e) Explanation of how the following could be done: 4

One mark per mark point, max four

MP1 initialise counting variable(s) …


MP2 … for accessible spaces and general spaces before any spaces have been allocated
MP3 increment the counter(s) …
MP4 … for accessible spaces and general spaces
MP5 maintain both counters for the full two-week cycle
MP6 output to show the total number of accessible and general spaces allocated so far, with suitable messages

• Task 3 – working out car park usage statistics


• Extend the program to enable the following statistics to be counted and output on request:
• The number of accessible spaces used on any of the 14 days.
• The number of general spaces used on any of the 14 days.
• The total number of spaces used on any of the 14 days.
• The number of accessible spaces used in the whole 14-day period.
• The number of general spaces used in the whole 14-day period.
• The total number of spaces used in the whole 14-day period.

© UCLES 2022 Page 8 of 15


0478/22 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

Section B

2 One mark for each correct line, max four 4

Programming concept Description

carrying out an action multiple times within a


loop structure
counting

adding together the numbers in a list of


repetition numbers

selection tracking the number of iterations a program


has performed in a loop

sequence branching off to take a course of action


depending on the answer to a question

totalling
a set of statements to be executed in order

© UCLES 2022 Page 9 of 15


0478/22 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

3 One mark per mark point, max three 3

MP1 verification is used to make sure the items in stock do not change from the original when they are input //
verification is used to make sure the items in stock do not change from what was intended to be input //
verification is used to make sure the items are accurately copied
MP2 enter each item in stock twice / double entry // visual check
MP3 matching description of the type of check stated in MP2

Example answers
Double entry [1] enter data twice and only accept identical values [1]
Visual check [1] look at the data that has been entered and confirm it matches [1]

Question Answer Marks

4 One mark per mark point, max two 2

• type of test data …


• … description of test data

Example answers
Normal data (1) data that would be accepted by the program (1)

Boundary / extreme data (1) data that is on the acceptable limits (1)

© UCLES 2022 Page 10 of 15


0478/22 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

5(a) One mark per mark point, max four 4

• Line 09 / Higher[HighList]  MarksEntry


should be Higher[HighList]  Mark

• Line 15 / MidList  MidList


should be MidList  MidList + 1

• Line 17 / Lower[HighList]  Mark


should be Lower[LowList]  Mark

• Line 22 / NEXT MarksEntry = 500


should be UNTIL MarksEntry = 500

Corrected algorithm
01 HighList  0
02 MidList  0
03 LowList  0
04 MarksEntry  0
05 REPEAT
06 INPUT Mark
07 IF Mark >= 80
08 THEN
09 Higher[HighList]  Mark
10 HighList  HighList + 1
11 ELSE
12 IF Mark >= 50
13 THEN
14 Middle[MidList]  Mark
15 MidList  MidList + 1

© UCLES 2022 Page 11 of 15


0478/22 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

5(a) 16 ELSE
17 Lower[LowList]  Mark
18 LowList  LowList + 1
19 ENDIF
20 ENDIF
21 MarksEntry  MarksEntry + 1
22 UNTIL MarksEntry = 500
23 OUTPUT "You entered ", HighList, " higher marks"
24 OUTPUT "You entered ", MidList, " middle marks"
25 OUTPUT "You entered ", LowList, " lower marks"

© UCLES 2022 Page 12 of 15


0478/22 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

5(b) One mark per mark point, max four 4

MP1 Set up a condition to end the input


MP2 The correct placement of the condition
MP3 Set up the test
MP4 The correct placement of the test
MP5 Removal of MarksEntry counter from the original algorithm

Example answers

Testing at the end of the algorithm


OUTPUT "Do you want to enter another mark?"
INPUT AnotherMark
UNTIL AnotherMark = "No"
should replace line 22 at end of loop
The MarksEntry counter can be removed // Lines 4 and 21 are not required / can be removed

Testing at the beginning of the algorithm


AnotherMark = "Yes"
WHILE AnotherMark = "Yes" DO
should replace line 05 at the start of the loop
OUTPUT "Do you want to enter another mark?"
INPUT AnotherMark
ENDWHILE
should replace line 22 at end of loop
The MarksEntry counter can be removed // Lines 4 and 21 are not required / can be removed

Terminal condition
OUTPUT "Enter -1 to end the program"
should be placed before the loop and / or before the input in 06
IF MARK <> -1 THEN
should be placed between lines 06 and 07
The MarksEntry counter can be removed // Lines 4 and 21 are not required / can be removed
UNTIL Mark = -1 should be placed at line 22

© UCLES 2022 Page 13 of 15


0478/22 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

6 One mark per mark point, max five 5

MP1 correct Counter and Number columns


MP2 correct Hundreds column
MP3 correct Temp and Tens columns
MP4 correct Units column
MP5 correct OUTPUT column

Counter Number Hundreds Temp Tens Units OUTPUT

1 97

2 876 8 76 7 6 Hundreds: 8 Tens: 7


Units: 6

3 4320

4 606 6 6 0 6 Hundreds: 6 Tens: 0


Units: 6

5 9875

6 42

7 124 1 24 2 4 Hundreds: 1 Tens: 2


Units: 4

© UCLES 2022 Page 14 of 15


0478/22 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

7(a)(i) SubjectCode Text 1


Exams Number

Data types must match those given in the question.

7(a)(ii) The Boolean data type can only have one of two values // the Candidates field has more than two possible values. 1

7(b) One mark per mark point, max three 3


• correct data
• correct layout
• correct order

Expected answer
Geography 200
Geology 80
History 250
Mathematics 350

7(c) One mark per mark point, max three 3


• correct fieldnames and table names
• correct sort and show rows
• correct search criteria

Field: SubjectCode SubjectName Candidates

Table: ASSESS ASSESS ASSESS

Sort: Descending

Show:     

Criteria: <150

or:

© UCLES 2022 Page 15 of 15


Cambridge IGCSE™

COMPUTER SCIENCE 0478/23


Paper 2 Problem-solving and Programming October/November 2022
MARK SCHEME
Maximum Mark: 50

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 2022 series for most
Cambridge IGCSE™, Cambridge International A and AS Level components and some Cambridge O Level
components.

This document consists of 10 printed pages.

© UCLES 2022 [Turn over


0478/23 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
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.

© UCLES 2022 Page 2 of 10


0478/23 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
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.

Please note the following further points:

The words in bold in the mark scheme are important text that needs to be present, or some notion of it needs to be present. It does not have to
be the exact word, but something close to the meaning.

If a word is underlined, this exact word must be present.

A single forward slash means this is an alternative word. A double forward slash means that this is an alternative mark point.

Ellipsis (…) on the end of one-mark point and the start of the next means that the candidate cannot get the second mark point without being
awarded the first one. If a mark point has an ellipsis at the beginning, but there is no ellipsis on the mark point before it, then this is just a follow-on
sentence and can be awarded without the previous mark point.

© UCLES 2022 Page 3 of 10


0478/23 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

Section A

1(a)(i) Many correct answers, the name used must be meaningful. The name given is an example only. 3

One mark per mark point, max three

Constant name BasicClean


Value 10.00
Reason this number will not change whilst the program is running

1(a)(ii) Description 3
Many correct answers, the name used must be meaningful. The name is an example only.

One mark per mark point, max three

MP1 name e.g. NameAddress


MP2 appropriate data type e.g. string
MP3 sample data for the array e.g. Mrs Singh, Park View

1(b) One mark per mark point, max three 3

MP1 use a conditional statement // an example of conditional statement used //


use an input statement with validation// an example of input statement used
MP2 any working method – for example, to only store True in the three floors array if the two floors array has not been
set to True
MP3 output an appropriate error message when an error condition has occurred //
choose appropriate routes through the program depending upon the choice of floors

© UCLES 2022 Page 4 of 10


0478/23 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

1(c) One mark per mark point, max six 6

MP1 initialise bill total to 10


MP1 check for additional windows
MP2 … and add in amount to total if required
MP3 check for 2 floors or 3 floors
MP4 … multiply by 1.1 or 1.15 as required
MP5 check for inside and multiply by 1.25 if required
MP6 check for polish and multiply by 1.05 if required
MP7 MP2 to MP7 completed in correct order
MP8 check for solar panels and add 20.00 if required

Sample
Total  10.00
ExtraWindowsCost INT((NumberExtraWindows[Bill] –1) / 5) * 5.00
Total  Total + ExtraWindowsCost
CASE NumberOfFloors[Bill] OF // check number of floors
2 : Total  Total * 1.1
3 : Total  Total * 1.15
ENDCASE
IF Inside[Bill] // check for cleaning inside windows
THEN
Total  Total * 1.25
ENDIF
IF Polish[Bill] // check for polishing windows
THEN
Total  Total * 1.05
ENDIF
IF Solar[Bill] // check for cleaning solar panels
THEN
Total  Total + 20.00
ENDIF

© UCLES 2022 Page 5 of 10


0478/23 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

1(d) Explanation 5

One mark per mark point, max five

MP1 how the program counted the number of customers using a service
MP1 … how the program counted this for all services
MP2 … excluding basic windows and additional windows
MP3 how the program identified the service with the largest number of customers
MP4 how the program identified the service with the smallest number of customers
MP5 how the program calculated a percentage of the total number of bills stored…
MP6 … for largest and smallest
MP7 how the program displayed these percentages with suitable messages

Programming statements when used must be explained.

© UCLES 2022 Page 6 of 10


0478/23 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

Section B

2(a) One mark per mark point in the correct position, max six 6

• line 01 50
• line 08 Value > 50
• line 12 Reading[Value] + 1
• line 18 INPUT Value
• line 23 Reading[Count]
• line 24 Count + 1

2(b) One mark per place in code and action, max three 3

• line 21 set Count to 50 / Count  50


• line 24 subtract 1 from Count / Count  Count –1
• line 25 check for Count equal to 34 / check for Count less than 35 / UNTIL Count = 34 / UNTIL Count < 35
or
One mark per place in code and action, max three

• line 21 set up FOR loop stating at 50 and finishing at 35 / FOR Count  50 TO 35 STEP –1
• Remove lines 22 and 24
• line 25 End FOR loop / NEXT Count

Examples
21 Count  50
22 REPEAT
23 OUTPUT "There are ", Reading[Count], " readings, " of ", Count
24 Count  Count –1
25 UNTIL Count = 34

21 FOR Count  50 TO 35 STEP –1


23 OUTPUT "There are ", Reading[Count], " readings, " of ", Count
25 NEXT Count

© UCLES 2022 Page 7 of 10


0478/23 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

3(a)(i) • 1 1

3(a)(ii) One mark for each correct letter seen, max two 2

• C
• D

3(b)(i) One mark per mark point, max two 2

• two or more digits


• transposed

3(b)(ii) One mark per mark point, max two 2

• multiply each digit by a different number / its place value


• before adding them together and dividing by a number

3(c) One mark per mark point, max two 2

• length check
• type check
• presence check
• format check

© UCLES 2022 Page 8 of 10


0478/23 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

4(a) One mark for each correct column, max four 4

Stock Total Sale OUTPUT

10 0

9 1 Y

8 2 Y

7 3 Y

6 4 Y

5 5 Y

4 6 Y

14

N Add new stock

4(b) One mark per mark point, max three 3

• input a number / quantity


• … check that the number is less than (or equal to) the number in stock
• … after checking for N
• update Stock by that number / Stock  Stock – Number
• update Total by that number / Total  Total + Number

© UCLES 2022 Page 9 of 10


0478/23 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

5(a) One mark per mark point, max two 2

• ItemCode
• uniquely identifies each item

5(b) One mark per mark point, max three 3

• correct rows Field, Table and Sort


• correct row Show
• correct Criteria row

Field: Description Country InStore

Table: MUSEUM MUSEUM MUSEUM

Sort:

Show:    

Criteria: N

or:

© UCLES 2022 Page 10 of 10

You might also like