Computer Science (0478) · Oct/Nov 2022 · Mark scheme 22

Cambridge Computer Science (0478) mark scheme for paper 22, Oct/Nov 2022 — 0478/22/O/N/22, file 0478_w22_ms_22.pdf.

Advertisement
Loading the paper…
Text of this paper

www.dynamicpapers.com

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
PUBLISHED
Generic Marking Principles

October/November 2022
www.dynamicpapers.com

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
PUBLISHED

October/November 2022
www.dynamicpapers.com

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

Cambridge IGCSE – Mark Scheme
PUBLISHED

0478/22

Question

October/November 2022
www.dynamicpapers.com

Answer

Marks

Section A
1(a)(i)

Many correct answers, the name used must be meaningful. The name given is an example only.
One mark per mark point, max two
•
•

2

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.
One mark per mark point, max two
•
•

© UCLES 2022

Array
Use

LicenceNumbers …
… storing the licence numbers of the cars to be parked

Page 4 of 15

2

Cambridge IGCSE – Mark Scheme
PUBLISHED

0478/22
Question
1(b)

Answer
One mark per mark point, max two
MP1
MP2
MP3
MP4
MP5

Marks
3

use a (range) check to check for values between 1 and 14
use a (type) check to ensure an integer is entered
… using an (appropriate) IF/conditional statement
outputs an error message if a new input is required
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

October/November 2022
www.dynamicpapers.com

Page 5 of 15

Cambridge IGCSE – Mark Scheme
PUBLISHED

0478/22
Question
1(c)

October/November 2022
www.dynamicpapers.com

Answer
One mark per mark point, max six
MP1
MP2
MP3
MP4
MP5
MP6
MP7
MP8
MP9
MP10
MP11

6

input for day number or to choose accessible parking …
… both inputs with appropriate prompts
conditional statement to check if accessible parking is required
initialisation of variable for the first accessible space
checking if current array element is an available space
correct loop to check all array elements for the day
… until an available space is found (or not)
input car licence number and name (with or without prompts)
… and store them in the correct array position(s)
appropriate output for space available or no space available
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

Marks

Page 6 of 15

Cambridge IGCSE – Mark Scheme
PUBLISHED

0478/22
Question
1(c)

Answer
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

October/November 2022
www.dynamicpapers.com
Marks

Cambridge IGCSE – Mark Scheme
PUBLISHED

0478/22
Question
1(d)

October/November 2022
www.dynamicpapers.com

Answer
Explanation of how the following could be done:

Marks
3

One mark per mark point, max three
MP1
MP2
MP3
MP4
MP5
1(e)

change the max constant to 560 / 28
change the output message for the user to say that the range of days entered must be from 1 to 28
alter the validation to allow an input of 1 to 28
change the size of the array that stores licence numbers / names so that it can hold the additional data
ensure that all loops that access the stored data for retrieval or erasing of data include the new full range

Explanation of how the following could be done:

4

One mark per mark point, max four
MP1
MP2
MP3
MP4
MP5
MP6
•
•
•
•
•
•
•
•

© UCLES 2022

initialise counting variable(s) …
… for accessible spaces and general spaces before any spaces have been allocated
increment the counter(s) …
… for accessible spaces and general spaces
maintain both counters for the full two-week cycle
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.

Page 8 of 15

Cambridge IGCSE – Mark Scheme
PUBLISHED

0478/22
Question

Answer

October/November 2022
www.dynamicpapers.com
Marks

Section B
2

One mark for each correct line, max four
Programming concept

counting

4
Description

carrying out an action multiple times within a
loop structure

repetition

adding together the numbers in a list of
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

Cambridge IGCSE – Mark Scheme
PUBLISHED

0478/22
Question
3

October/November 2022
www.dynamicpapers.com

Answer
One mark per mark point, max three
MP1

MP2
MP3

Marks
3

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
enter each item in stock twice / double entry // visual check
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
4

Answer
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

Marks

Page 10 of 15

Cambridge IGCSE – Mark Scheme
PUBLISHED

0478/22
Question
5(a)

Answer
One mark per mark point, max four
•

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

Marks
4

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

October/November 2022
www.dynamicpapers.com

Page 11 of 15

0478/22
Question
5(a)

© UCLES 2022

Cambridge IGCSE – Mark Scheme
PUBLISHED
Answer
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"

Page 12 of 15

October/November 2022
www.dynamicpapers.com
Marks

Cambridge IGCSE – Mark Scheme
PUBLISHED

0478/22
Question
5(b)

Answer
One mark per mark point, max four
MP1
MP2
MP3
MP4
MP5

Marks
4

Set up a condition to end the input
The correct placement of the condition
Set up the test
The correct placement of the test
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

October/November 2022
www.dynamicpapers.com

Page 13 of 15

Question
6

October/November 2022
www.dynamicpapers.com

Cambridge IGCSE – Mark Scheme
PUBLISHED

0478/22

Answer

Marks

One mark per mark point, max five
MP1
MP2
MP3
MP4
MP5

5

correct Counter and Number columns
correct Hundreds column
correct Temp and Tens columns
correct Units column
correct OUTPUT column
Counter

Number Hundreds

Temp

Tens

Units

OUTPUT

8

76

7

6

Hundreds: 8 Tens: 7
Units: 6

6

6

0

6

Hundreds: 6 Tens: 0
Units: 6

1

24

2

4

Hundreds: 1 Tens: 2
Units: 4

0
1

97

2

876

3

4320

4

606

5

9875

6

42

7

124

8

© UCLES 2022

Page 14 of 15

Question
7(a)(i)

October/November 2022
www.dynamicpapers.com

Cambridge IGCSE – Mark Scheme
PUBLISHED

0478/22

Answer

Marks

SubjectCode Text
Exams Number

1

Data types must match those given in the question.
7(a)(ii)
7(b)

The Boolean data type can only have one of two values // the Candidates field has more than two possible values.

1

One mark per mark point, max three
• correct data
• correct layout
• correct order

3

Expected answer
Geography 200
Geology 80
History 250
Mathematics 350
7(c)

One mark per mark point, max three
• correct fieldnames and table names
• correct sort and show rows
• correct search criteria

3

Field: SubjectCode
Table: ASSESS

SubjectName

Candidates

ASSESS

ASSESS

Sort:
Show:

Descending

Criteria:

<150

or:

© UCLES 2022

Page 15 of 15

Advertisement