0% found this document useful (0 votes)
5 views

Comp Sc 2022

Uploaded by

meelaanya04
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)
5 views

Comp Sc 2022

Uploaded by

meelaanya04
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
You are on page 1/ 157

Cambridge IGCSE™

* 1 4 2 8 2 4 6 4 9 8 *

COMPUTER SCIENCE 0478/12


Paper 1 Theory February/March 2022

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 12 pages. Any blank pages are indicated.

DC (LK) 303935/2
© UCLES 2022 [Turn over
2

1 A computer stores data in binary form. Binary numbers can be represented as hexadecimal and
denary numbers.

(a) Convert the 8-bit binary number 01010101 to denary.

............................................................................................................................................. [1]

Working space

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

(b) Convert the binary number 11000000 to hexadecimal.

............................................................................................................................................. [1]

Working space

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

(c) Convert the hexadecimal number 1A to denary.

............................................................................................................................................. [1]

Working space

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

(d) Binary numbers can be stored as bytes.

State how many bits are in two bytes.

............................................................................................................................................. [1]

© UCLES 2022 0478/12/F/M/22


3

2 Nadia creates a digital image for a school project.

(a) Give one example of an image format.

............................................................................................................................................. [1]

(b) Describe how a digital image file is stored by a computer.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(c) Nadia compresses the digital image file before emailing it to a friend.

(i) State what is meant by data compression.

...........................................................................................................................................

..................................................................................................................................... [1]

(ii) Explain why Nadia compresses the digital image file before emailing it.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

© UCLES 2022 0478/12/F/M/22 [Turn over


4

(iii) Nadia’s email service uses parity bits as a method of error detection during the
transmission of data.

Describe how the parity bits are used to detect errors.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [5]

(iv) Identify and describe one other method of error detection used during the transmission
of data.

Method ..............................................................................................................................

Description ........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[4]

© UCLES 2022 0478/12/F/M/22


5

3 (a) Tick (3) to show which logic gates will give an output of 1 for the given inputs A and B.

Inputs AND OR NAND NOR XOR


A=1
B=1
A=0
B=0
A=1
B=0
[3]

(b) Draw the logic circuit for the given logic statement:

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

Do not attempt to simplify the logic statement. All logic gates must have a maximum of two
inputs.

B X

[4]

© UCLES 2022 0478/12/F/M/22 [Turn over


6

4 Pradeep uses his personal computer to complete work at home.

(a) Pradeep uses a mouse and a keyboard to control the computer.

(i) Complete the descriptions of the principles of operation of a mouse and a keyboard
using the most appropriate terms from the list. Not all terms in the list need to be used.

• absorbs
• ball
• biometric
• circuit
• colour
• digital
• direction
• Light-Emitting Diode (LED)
• Liquid Crystal Display (LCD)
• reflects
• speed
• switch
• transparency

An optical mouse shines a red light from a ................................................... underneath

the mouse. The light .................................................. back from a surface through a

lens in the mouse and is converted to a value. This value is transmitted to the

computer. The computer then determines the ................................................... and

................................................... of the movement.

When the user presses a key on a keyboard, the key pushes the

................................................... on the circuit board. This completes a

................................................... . Signals are sent to the computer. The computer uses

the data to calculate which key was pressed.


[6]

(ii) Identify two other input devices Pradeep could use with his personal computer.

Input device 1 ....................................................................................................................

Input device 2 ....................................................................................................................


[2]

© UCLES 2022 0478/12/F/M/22


7

(b) Pradeep uses a projector attached to the ceiling at his home to watch high-definition (HD)
films.

The projector has broken. He wants to buy a replacement. He needs to choose between an
LCD projector and a Digital Light Projector (DLP).

Explain why an LCD projector would be more appropriate for Pradeep.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(c) Pradeep stores his collection of films and his work files on his personal computer.

Pradeep wants to save a copy of all his films and files onto a single storage device.

Identify and justify an appropriate storage device to store the copies.

Storage device ..........................................................................................................................

Justification ...............................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[4]

© UCLES 2022 0478/12/F/M/22 [Turn over


8

5 A holiday company has a website where customers can create accounts and can book and pay for
holidays.

(a) The website is written in Hypertext Markup Language (HTML).

Give two examples of HTML structure and two examples of HTML presentation.

Structure 1 ................................................................................................................................

Structure 2 ................................................................................................................................

Presentation 1 ..........................................................................................................................

Presentation 2 ..........................................................................................................................
[4]

(b) The website is stored on a web server. Customers use their own computers to access the
website.

Uniform Resource Locator (URL), Internet Protocol (IP) and Media Access Control (MAC) are
three types of address used by computers when accessing the Internet.

Give two features of each type of address in the table.

Type of
Features
address

............................................................................................................................

............................................................................................................................
URL
............................................................................................................................

............................................................................................................................

............................................................................................................................

............................................................................................................................
IP
............................................................................................................................

............................................................................................................................

............................................................................................................................

............................................................................................................................
MAC
............................................................................................................................

............................................................................................................................
[6]

© UCLES 2022 0478/12/F/M/22


9

(c) The company is concerned about threats to its web server.

Complete the table by identifying:

• two potential threats to its web server


• the impact each threat could have on the company
• software the company can use to help to limit each threat.

Each impact must be different.

Threat Impact on company Software

.........................................................................
............................ ..................................
.........................................................................
............................ ..................................
.........................................................................

.........................................................................

.........................................................................
............................ ..................................
.........................................................................
............................ ..................................
.........................................................................

.........................................................................
[6]

© UCLES 2022 0478/12/F/M/22 [Turn over


10

6 A business uses a closed-circuit television (CCTV) system that starts recording when motion is
detected. It stops recording after two minutes if no further motion is detected. The system uses a
motion sensor and a microprocessor.

Describe how the motion sensor and microprocessor work together to control the CCTV system.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

.................................................................................................................................................... [7]

© UCLES 2022 0478/12/F/M/22


11

7 Ishani is a software developer who is creating a new computer game.

(a) Ishani uses an interpreter and a compiler at different stages of the game creation.

(i) Explain when it is most appropriate for Ishani to use an interpreter.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [3]

(ii) Explain when it is most appropriate for Ishani to use a compiler.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [3]

(b) Ishani has to decide between releasing her game as freeware or free software.

Describe freeware and free software.

Freeware ..................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Free software ............................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[4]

© UCLES 2022 0478/12/F/M/22


12

BLANK PAGE

Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge
Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download
at www.cambridgeinternational.org after the live examination series.

Cambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge
Local Examinations Syndicate (UCLES), which is a department of the University of Cambridge.

© UCLES 2022 0478/12/F/M/22


Cambridge IGCSE™

COMPUTER SCIENCE 0478/12


Paper 1 February/March 2022
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 2022 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 2022 [Turn over


0478/12 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 13


0478/12 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 13


0478/12 Cambridge IGCSE – Mark Scheme February/March 2022
PUBLISHED
Question Answer Marks

1(a) 85 1

1(b) C0 1

1(c) 26 1

1(d) 16 1

Question Answer Marks

2(a) e.g. JPEG 1

2(b) Any three from: 3


• Image is made of pixels
• Each pixel stores one colour
• Image has a set number of pixels wide by pixels high
• Each colour has a unique binary value // Each colour has a unique colour code
• The colour/binary value of each pixel is stored in sequence
• File contains metadata to identify how the file should be displayed
• … metadata can be the colour depth / resolution

2(c)(i) Reducing the file size 1

2(c)(ii) Any two from: 2


• reduces the storage/memory space taken on email server // reduces the storage space taken on her friend's
computer when downloaded
• sending/receiving email accounts may have restricted file size for attachments
• reduces the time taken to transmit/upload/download to destination
• reduces amount of bandwidth needed to transmit/download
• file will mean less data usage is taken (for mobile clients)

© UCLES 2022 Page 4 of 13


0478/12 Cambridge IGCSE – Mark Scheme February/March 2022
PUBLISHED
Question Answer Marks

2(c)(iii) Any five from: 5


• Parity can be set to odd or even
• Sender and receiver agree on parity to use
• Data/email/image is split into bytes // blocks of 7 bytes
• Sender counts the number of 1s/0s in each group/byte
• Each group/byte is assigned a parity bit to match the parity/odd/even
• Receiving device/server recounts the number of 1s/0s in each group/byte
• … and compares to parity used/odd/even and if it does not match the parity, an error is reported/identified
• (in block check) the location of the error(s) can be identified/estimated at the intersection

2(c)(iv) 1 mark for identification 4


Any three for corresponding description:

• Checksum
• Value is calculated from the data …
• …using an algorithm // by example
• Value is transmitted with the data
• Value recalculated by receiver (using same algorithm) …
• …if checksum values are different there is an error // reverse

• Automatic Repeat request/reQuery (ARQ)


• Uses acknowledgement and timeout
• Sender starts a timer when data is transmitted
• Receiver uses an error checking method to check whether the data has been received accurately
• If no error detected a positive acknowledgement is returned to sender
• If error detected negative acknowledgement is returned to sender
• If sender gets no acknowledgement within the set time it resends the data

© UCLES 2022 Page 5 of 13


0478/12 Cambridge IGCSE – Mark Scheme February/March 2022
PUBLISHED
Question Answer Marks

3(a) 1 mark per row 3


Inputs AND OR NAND NOR XOR

A=1  
B=1

A=0  
B=0

A=1   
B=0

3(b) 1 mark per gate 4

• A XOR B
• NOT C
• (NOT C) OR B
• AND

© UCLES 2022 Page 6 of 13


0478/12 Cambridge IGCSE – Mark Scheme February/March 2022
PUBLISHED
Question Answer Marks

4(a)(i) 1 mark for each completed statement 6

An optical mouse shines a red light from a Light-Emitting Diode//LED underneath the mouse. The light reflects back
from a surface through a lens in the mouse and is converted to a value. This value is transmitted to the computer. The
computer then determines the direction and speed of the movement.
When the user presses a key on a keyboard, the key pushes the switch on the circuit board. This completes a circuit.
Signals are sent to the computer that uses the data to calculate which key was pressed.

4(a)(ii) 1 mark each e.g. 2


• touchscreen
• touchpad
• scanner
• microphone

4(b) Any three from: 3


• More visible pixels // higher resolution
• Higher colour contrast (in ambient lighting) // more vivid colours
• Colours are (often) more accurate
• Image (usually) appears brighter (with same wattage)
• Will be stationary so does not need the portability of DLP
• Does not need the compactness of DLP
• Cost of purchase (usually) less
• Run quieter
• Any surface can be used as a display
• Uses less power
• Produces less heat
• Does not give the rainbow effect DLP often gives
• Longer lasting lamps

© UCLES 2022 Page 7 of 13


0478/12 Cambridge IGCSE – Mark Scheme February/March 2022
PUBLISHED
Question Answer Marks

4(c) 1 mark for naming appropriate device 4


• hard disk / HDD / magnetic
• solid state drive / SSD / USB memory stick / flash drive

1 mark each for matching justification to max 3.


e.g.

HDD
• Large capacity storage
• …for videos/films that have large file sizes / require large storage space
• Longevity // Can be read from/written to large number of times
• … the copies will be accessible for a long time // device will not break if accessed regularly
• …may require large number of read/write to access fields
• Relatively cheap per GB // cheaper than SSD per GB …
• … there is a large capacity required therefore overall may cost less than other devices
• Device will not be moved regularly so no need for portability/durability

SSD
• Large capacity storage
• …for videos/films that have large file sizes / require large storage space
• No moving parts
• …can be carried/moved to other locations with limited risk of damage
• Fast access speed
• … videos are large files that will be stored/accessed in less time
• Cost per GB is not significant (in comparison)
• …there is a large capacity required therefore overall cost will not be significantly more than others
• Used as a copy of files to may not be accessed regularly
• … the limited number of read/write times/longevity is inconsequential
• Uses less power // runs cooler
• No latency // does not take time to start-up

© UCLES 2022 Page 8 of 13


0478/12 Cambridge IGCSE – Mark Scheme February/March 2022
PUBLISHED
Question Answer Marks

5(a) 1 mark for each example, allow description or tags 4


Structure e.g.
• head
• body
• table
• heading
• subheading
• paragraph
• object position on the page // alignment
• margins
• borders (position/size)
• padding

Presentation e.g.
• colour
• font size
• font style
• border (style)

© UCLES 2022 Page 9 of 13


0478/12 Cambridge IGCSE – Mark Scheme February/March 2022
PUBLISHED
Question Answer Marks

5(b) 1 mark for each bullet to max 2 for each 6


Type of address Features

• protocol
• domain name
URL • top level domain
• file/folder name/address/directory/path
• made up of letters, numbers and symbols

IPv4:
• 4 groups of numbers // 12 numbers
• separated by full stops (.)
• 0-255 in each group
• 4 bytes long // 32 bits
• Represented in denary
IP
IPv6:
• 8 groups of numbers // 32 numbers
• separated by colons (:)
• 0-FFFF in each group
• 16 bytes long // 128 bits
• Consecutive groups of 0000 can be replaced with ::
• Represented in hexadecimal

• First part is manufacturer ID


• Second part is serial number
• Each part has 3 pairs of numbers // Each part has 6 numbers // 6 pairs of 2-digits
// consists of 12 numbers
MAC
• …between 00 and FF
• ..separated by :
• Each part is 3 bytes // Is 6 bytes long // Is 48 bits long
• Represented using hexadecimal

© UCLES 2022 Page 10 of 13


0478/12 Cambridge IGCSE – Mark Scheme February/March 2022
PUBLISHED
Question Answer Marks

5(c) 1 mark for threat. 1 for impact. 1 for software. 6

Do not award identical impacts twice but read whole answer and award if additional impact given.
Allow the same software twice.
e.g.
Threat Impact on company Software

Denial of service • Users cannot access the website Proxy/firewall


• Loss of sales (of holidays)
• Loss of reputation

Virus/malware • Data on the server may be Anti-virus


deleted/changed
• Website may be deleted/changed
• Server may be filled with data and
crash

Unauthorised • Data could be Proxy/Firewall


access // hacker deleted/stolen/changed

Question Answer Marks

6 Any seven from: 7


• (Motion) sensor sends signals to microprocessor
• analogue signal is converted to digital
• microprocessor compares signal to stored value …
• …if it does not meet / meets the stored value (and if camera is not recording) the microprocessor sends signal (to
camera) to start recording
• … if it does not meet / meets the stored value the microprocessor starts/resets the timer
• When the timer reaches 2 minutes the microprocessor sends signal (to camera) to stop recording
• Whole process is repeated continually/until turned off

© UCLES 2022 Page 11 of 13


0478/12 Cambridge IGCSE – Mark Scheme February/March 2022
PUBLISHED
Question Answer Marks

7(a)(i) 1 mark for when 3


e.g.
• Development // when writing the program // when debugging

1 mark for explanation to max 2 from:


e.g.
• … easier to debug
• …stops when an error is detected
• …reports one error at a time
• …can correct errors in run-time // correct the line and then continue running from that point
• …can test one section without the rest of the code being completed

7(a)(ii) 1 mark for when 3


e.g.
• After completion // For distribution // For final/repeated testing

1 mark each to max 2 from: e.g.


After completion
• It creates an executable file
• …than can be distributed without source code
• …so that other people cannot edit/view the code
• …so end users do not need translator software // so end users do not need to compile/interpret each time
• …so it is machine/platform independent (usually)
In final testing
• It creates an executable file
• …do not need to retranslate for each test sequence
• …can test repeatedly with different data faster

© UCLES 2022 Page 12 of 13


0478/12 Cambridge IGCSE – Mark Scheme February/March 2022
PUBLISHED
Question Answer Marks

7(b) Any four from, max 2 from each: 4


Freeware:
• There is no cost to the user // free trial
• No source code provided
• …cannot be modified
• Can be redistributed (in same state)
• Is subject to copyright

Free software:
• User has access to the source code
• Can be modified (without restriction)
• Can be redistributed (without restriction)
• Can have a cost associated but does not have to
• Is subject to copyright

© UCLES 2022 Page 13 of 13


Cambridge IGCSE™
* 7 8 1 6 1 9 5 1 1 4 *

COMPUTER SCIENCE 0478/22


Paper 2 Problem-solving and Programming February/March 2022

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Do not attempt Tasks 1, 2 and 3 in the copy of the pre-release material on page 2; these are for
information only.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 50.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 16 pages. Any blank pages are indicated.

DC (CJ) 303924/3
© UCLES 2022 [Turn over
2

Section A

You are advised to spend no longer than 40 minutes answering this section.
Here is a copy of the pre-release material.
DO NOT attempt Tasks 1, 2 and 3 now.
Use the pre-release material and your experience from attempting the following tasks before the
examination to answer Question 1.
Pre-release material

A program is needed to record the number of strokes played by each player in a round of golf and
decide who is the winning player.
The object of the game of golf is to hit a small ball into a series of small holes using a golf club.
A score is kept of the number of times a player needs to hit the ball to get it in a hole; this is the
number of strokes for the hole. The total score for a round of golf is the total number of strokes taken
for each hole. The player with the least number of strokes is the winner.
A golf course consists of 9 or 18 holes. A round of golf is completed when all the holes have been
played. There can be 2, 3 or 4 players taking part in a round of golf. The number of strokes that
an experienced golfer would take to complete a round is called par. The scores for the round are
displayed in relation to the par score. For example, if par for an 18-hole course was 72, a score of 80
would be 8 over par and a score of 70 would be 2 under par.
Write and test a program or programs to score a round of golf:
• Your program or programs must include appropriate prompts for the entry of data. Data must be
validated on entry.
• All outputs, including error messages, need to be set out clearly and understandably.
• All variables, constants and other identifiers must have meaningful names.
You will need to complete these three tasks. Each task must be fully tested.
Task 1 – setting up the round
Each player’s scores for the round are to be stored in an array with a separate score for each hole.
The scores in these arrays are to be set to zero before a round starts.
The following data is to be input and stored:
• the number of players taking part in the round
• the names of the players
• the number of holes to be played: 9 or 18
• the par for the course.
The number of players, their names, the number of holes to be played and the par for the course are
all displayed to be checked before the round starts so that any errors seen can be corrected.
Task 2 – scoring the round
For each hole played, each player’s name is displayed on the screen and they are asked to enter
the number of strokes they played for that hole. Each player must enter the number of strokes twice
to verify their score. A player can choose to see the total number of strokes that they have played so
far in the round.
Task 3 – deciding the winning player
At the end of the round, display the name and final score for each player relative to par. The winner
is identified; display their name and the winning score. There are also options that display:
• every player’s score for each hole
• the player’s name and hole number of any score of one for a hole (hole-in-one)
• the average score for the round
• the average score for a hole.

© UCLES 2022 0478/22/F/M/22


3

1 All variables, constants and other identifiers must have meaningful names.

(a) State one constant and one variable that you could have used for Task 1. Give the value
that would be assigned to the constant. Give the data type for the variable. Explain why the
constant was used rather than a variable and explain why the variable was used rather than a
constant.

Constant name .........................................................................................................................

Value .........................................................................................................................................

Why a constant was used .........................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Variable name ...........................................................................................................................

Data type ..................................................................................................................................

Why a variable was used ..........................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[6]

(b) Describe how your program set the scores to zero before each round for Task 1.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2022 0478/22/F/M/22 [Turn over


4

(c) Write an algorithm for Task 2, using pseudocode, programming statements or a flowchart.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

© UCLES 2022 0478/22/F/M/22


5

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [6]

© UCLES 2022 0478/22/F/M/22 [Turn over


6

(d) Explain how your program completed part of Task 3 to identify the winner and to display their
name and the winning score relative to par. All programming statements that you include
must be fully explained.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2022 0478/22/F/M/22


7

Section B starts on page 8

© UCLES 2022 0478/22/F/M/22 [Turn over


8

Section B

2 An algorithm has been written to:

• input the ages of 100 students


• count and output the number of students aged 7 and under 12
• count and output the number of students aged 12 and under 18
• count and output the number of students aged 18 and over.

(a) Complete the pseudocode algorithm:

01 Count7to12 0 ←
02 Count12to18 0 ←
03 CountOver18 0 ←
04 FOR Student ←
1 TO ............................................
05 OUTPUT "Please enter student's age in years "
06 INPUT Age
07 IF Age >= 7 ................................................
08 THEN
09 Count7to12 Count7to12 + 1 ←
10 ENDIF
11 IF Age >= 12 AND Age < 18
12 THEN
13 Count12to18 ←
.........................................
14 ENDIF
15 IF Age >= 18
16 THEN
17 CountOver18 CountOver18 + 1 ←
18 ENDIF
19 NEXT Student
20 OUTPUT "There are ", Count7to12, " students aged 7 and under 12."
21 OUTPUT "There are ", Count12to18, " students aged 12 and under 18."
22 OUTPUT "There are ", ................., " students aged 18 and over."
[4]

(b) Write the extra pseudocode statements that are needed to count and output the number of
students under the age of 7. Use the variable CountUnder7; assume CountUnder7 has
already been set to zero.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2022 0478/22/F/M/22


9

3 Four validation checks and five descriptions are shown.

Draw a line from each validation check to the most appropriate description.

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
[4]

© UCLES 2022 0478/22/F/M/22 [Turn over


10

4 This flowchart inputs a whole number. The function INT returns the integer value of a number. For
example, INT (7.5) is 7

An input of -1 ends the routine.

START

INPUT Number

IS Number Yes
END
= –1?
No

C 0
D INT(Number/2)

IS
INT(Number/D) Yes
= Number/D?

No
C C + 1

D D – 1

No IS D =
1?

Yes

Yes IS C =
0?
No

OUTPUT C

© UCLES 2022 0478/22/F/M/22


11

(a) Complete the trace table for the given algorithm using this input data:
7, 6, 5, 4, –1, 12, 34

Number C D OUTPUT

[6]

(b) Describe the purpose of this algorithm.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

(c) (i) Describe the problem that occurs if a whole number smaller than 4 and not equal to –1
is input.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(ii) Explain how to change the flowchart to prevent this problem occurring.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]
© UCLES 2022 0478/22/F/M/22 [Turn over
12

5 A database table, FLOWER, is used to keep a record of the type of flowers available to make up a
bouquet.

FlowerID Type Colour Style Fragrance


CN001 Carnation Pink Stem Y
CN002 Carnation Red Stem N
CN103 Carnation White Stem N
CN104 Carnation Yellow Stem Y
CN105 Carnation Pink Spray Y
CN106 Carnation Red Spray N
CN107 Carnation White Spray N
CN108 Carnation Yellow Spray Y
RE101 Rose Pink Stem Y
RE102 Rose Red Stem Y
RE103 Rose White Stem N
RE104 Rose Yellow Stem Y
RE105 Rose Orange Spray Y
RE106 Rose Peach Spray N
LY101 Lily White Spray Y

© UCLES 2022 0478/22/F/M/22


13

A query-by-example has been written to display just the type, style and colour of all flowers that
have no fragrance.

Field: FlowerID Fragrance Style Colour

Table: FLOWER FLOWER FLOWER FLOWER

Sort:

Show: 3 3 3 3

Criteria: =Y

or:

Explain why the query-by-example is incorrect and write a correct query-by-example.

Explanation ......................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

Field:

Table:

Sort:

Show:

Criteria:

or:
[6]

© UCLES 2022 0478/22/F/M/22


14

BLANK PAGE

© UCLES 2022 0478/22/F/M/22


15

BLANK PAGE

© UCLES 2022 0478/22/F/M/22


16

BLANK PAGE

Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge
Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download
at www.cambridgeinternational.org after the live examination series.

Cambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge
Local Examinations Syndicate (UCLES), which is a department of the University of Cambridge.

© UCLES 2022 0478/22/F/M/22


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™
* 4 9 1 4 2 9 0 2 3 5 *

COMPUTER SCIENCE 0478/12


Paper 1 Theory May/June 2022

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 12 pages.

DC (RW) 303775/2
© UCLES 2022 [Turn over
2

1 (a) Denary values are converted to binary values to be processed by a computer.

Draw one line from each denary value to the correctly converted 8‑bit binary value.

Denary 8-bit binary

00100001

41
10100110

00101001

174

10000110

10101110
86

01010110

[3]

Working space

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

(b) Binary values can also be converted to denary values.

Give the correct denary value for the 12‑bit binary value 000101010111
Show all your working.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Denary value ..........................................................


[2]

© UCLES 2022 0478/12/M/J/22


3

2 Hexadecimal is used for Hypertext Markup Language (HTML) colour codes.

An HTML colour code is:


#2F15D6
Each pair of digits is stored as binary in an 8‑bit register.

(a) Give the 8‑bit binary value that would be stored for each pair of hexadecimal digits.

2F

15

D6

[6]

Working space

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

(b) HTML colour codes and Media Access Control (MAC) addresses are two examples of where
hexadecimal is used in Computer Science.

Give two other examples of where hexadecimal can be used in Computer Science.

Example 1 .................................................................................................................................

Example 2 .................................................................................................................................
[2]

© UCLES 2022 0478/12/M/J/22 [Turn over


4

(c) Websites can be created using HTML structure and presentation.

State what is meant by HTML structure and presentation.

Give an example of each in your answer.

Structure ...................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Presentation .............................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[4]

(d) Explain why presentation is often separated from structure when creating a web page.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2022 0478/12/M/J/22


5

3 Joelle is a student who uses the Internet.

(a) The table contains five terms or definitions that relate to the Internet.

Complete the table by writing each missing term or definition.

Term Definition

........................................................................................

browser ........................................................................................

........................................................................................

this is the company that provides a user with a


...................................................
connection to the Internet

this is a protocol that is used to send data for web


...................................................
pages across the Internet

........................................................................................

Uniform Resource Locator (URL) ........................................................................................

........................................................................................

........................................................................................

cookie ........................................................................................

........................................................................................

[5]

© UCLES 2022 0478/12/M/J/22 [Turn over


6

(b) Joelle uses a firewall to keep her data safe when she uses the Internet.

Tick (3) to show which statement about firewalls is true.

Tick (3)

Firewalls can only be hardware‑based

Firewalls can only be software‑based

Firewalls can be hardware‑based or software‑based


[1]

(c) Joelle’s parent also uses the firewall to limit the websites that Joelle can access.

Explain how the firewall is used to limit the websites that Joelle can access.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2022 0478/12/M/J/22


7

4 Jason is a programmer who writes computer programs in a high‑level language.

(a) Describe what is meant by a high‑level language.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(b) Jason wants to distribute a computer program he has written. He is considering distributing it
to users as freeware or free software.

(i) Explain one drawback to a user if the program is distributed as freeware.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(ii) Explain one benefit to a user if the program is distributed as free software.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

© UCLES 2022 0478/12/M/J/22 [Turn over


8

5 Consider the following logic statement:

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

(a) Draw a logic circuit to represent the given logic statement.

Do not attempt to simplify the logic statement. All logic gates must have a maximum of two
inputs.

B X

[5]

© UCLES 2022 0478/12/M/J/22


9

(b) Complete the truth table for the given logic statement.

Working space
A B C X

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1
[4]

6 Millions of emails are sent between users on a daily basis.

(a) Identify two online security attacks that can be carried out using email.

Describe how email is used to enable the attack.

Online security attack 1 ............................................................................................................

Description ................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

Online security attack 2 ............................................................................................................

Description ................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
[6]

© UCLES 2022 0478/12/M/J/22 [Turn over


10

(b) Online security attacks can maliciously damage data.

One security method to keep data safe from online attacks is a firewall.

Identify two other security methods that keep data safe from online attacks.

Security method 1 .....................................................................................................................

Security method 2 .....................................................................................................................


[2]

(c) Data can also be damaged accidentally.

One example of how data can be damaged accidentally is by shutting down a computer
before saving data. To prevent this from happening, a user should make sure they have
saved all data before shutting down a computer.

Complete the table by giving three other examples of how data can be damaged accidentally.

Give a method of prevention for each example.

Example Method of prevention

...................................................................... ......................................................................

...................................................................... ......................................................................

...................................................................... ......................................................................

......................................................................

...................................................................... ......................................................................

...................................................................... ......................................................................

...................................................................... ......................................................................

......................................................................

...................................................................... ......................................................................

...................................................................... ......................................................................

...................................................................... ......................................................................

......................................................................

[6]

© UCLES 2022 0478/12/M/J/22


11

7 Cassie stores data for her business every day. She stores the data using optical data storage.

(a) Identify three examples of optical data storage.

Example 1 .................................................................................................................................

Example 2 .................................................................................................................................

Example 3 .................................................................................................................................
[3]

(b) Six statements are given about the operation of three different types of storage.

Tick (3) to show which statements apply to each type of storage. Some statements may
apply to more than one type of storage.

Type of storage
Magnetic Optical Solid state
Statement
(3) (3) (3)

this storage has no moving parts

this storage uses a laser to read and write data

this storage uses a read/write head

this storage burns pits onto a reflective surface

this storage uses NAND and NOR technology

this storage stores data in tracks and sectors

[6]

© UCLES 2022 0478/12/M/J/22 [Turn over


12

8 Sam develops a software application. He distributes a version of the software as shareware.

(a) Describe what is meant by shareware.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

(b) Identify three ethical issues that may need to be considered when developing and distributing
software.

Ethical issue 1 ..........................................................................................................................

Ethical issue 2 ..........................................................................................................................

Ethical issue 3 ..........................................................................................................................


[3]

Permission to reproduce items where third‑party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer‑related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge
Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download
at www.cambridgeinternational.org after the live examination series.

Cambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge
Local Examinations Syndicate (UCLES), which is a department of the University of Cambridge.

© UCLES 2022 0478/12/M/J/22


Cambridge IGCSE™

COMPUTER SCIENCE 0478/12


Paper 1 Theory May/June 2022
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 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/12 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/12 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.

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 13


0478/12 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

1(a) One mark for each correct line 3

Denary 8-bit binary

00100001

41 10100110

00101001

174

10000110

86 10101110

01010110

1(b) One mark for correct working, one mark for correct answer 2

Working e.g.
 256  64  16  4  2  1

Answer:
 343

© UCLES 2022 Page 4 of 13


0478/12 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

2(a) Two marks each correct conversion (one mark for the first four bits, one mark for the second four bits) 6

0 0 1 0 1 1 1 1
2F

0 0 0 1 0 1 0 1
15

1 1 0 1 0 1 1 0
D6

2(b) Any two from: 2


 IP address
 Error messages/codes
 Assembly language // low-level language
 URL // web address
 Memory dumps
 Locations in memory

2(c) One mark for a description, one mark for a correct example 4

Structure
 Layout of the web page
 e.g. Where text is placed

Presentation
 Formatting of the web page
 e.g. the colour of the font

© UCLES 2022 Page 5 of 13


0478/12 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

2(d) Two from: 2

 The formatting of the page can be changed/edited without needing to alter the structure
 … so, they can make regular updates without needing to check the structure

 The formatting document can be used again for a different website …


 If further content and web pages are added to the website, the necessary formatting can be easily applied …
 … so, this can save time when developing/updating a website
 Allows use of CSS to standardise formatting
 … so, CSS only needs to be created once (to be applied to each webpage)

© UCLES 2022 Page 6 of 13


0478/12 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

3(a) One mark for the correct term or definition 5

Term Definition

browser Software/application that allows users to view web


pages / render HTML

Internet Service this is the company that provides a user with a


provider // ISP connection to the Internet

HTTP // HTTPS this is a protocol that is used to send data for web
pages across the Internet

Uniform Resource a text-based version of a web address


Locator (URL)

cookie a text file (stored by web browser) that contains data


about a user’s browsing habits/details/preferences

3(b)  Hardware or software based 1

3(c) Four from: 4

 (The parent can) set criteria for the websites she is allowed to visit
 … such as a whitelist/blacklist of websites
 The firewall will examine the data/traffic incoming and outgoing from her computer
 If data is sent from a website that is not allowed, it will be blocked

© UCLES 2022 Page 7 of 13


0478/12 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

4(a) Any three from: 3

 It uses English-like statements


 It needs to be converted to machine code (to be processed by a computer)
 … using a translator
 It is portable
 One line of code can perform multiple commands

4(b)(i) Two from: 2

 The user is not allowed to access the source code …


 … so, they cannot tailor the software to their needs
 … so, they cannot fix any bugs in it
 The software is still covered by copyright
 The user must get the owner’s permission to do anything beyond using it

4(b)(ii) Two from: 2

 The user can access the source code …


 … so, they can tailor the software to their needs
 … so, they can fix any bugs in it
 … so, the source code could be studied for educational purposes
 The user can redistribute the software/program …
 … but this must be done under the same terms as the original software

© UCLES 2022 Page 8 of 13


0478/12 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

5(a) One mark for each correct logic gate with correct input(s) 5

5(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 Working space X

0 0 0 0

0 0 1 0

0 1 0 0

0 1 1 1

1 0 0 0

1 0 1 0

1 1 0 0

1 1 1 1

© UCLES 2022 Page 9 of 13


0478/12 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

6(a) One mark for identifying the attack, two marks for the description 6

 Phishing
 Email is sent to user to encourage them to click link
 … that takes user to fake website

Pharming
 Email is sent to user to encourage them to click link/download attachment
 … that triggers download of malicious code that will redirect user to fake website

Virus/malware
 Email is sent to user to encourage them to click link/download attachment
 … that triggers download of virus/malware

Denial of service // DoS


 A very large number of emails are sent to a server/network at the same time
 … crashing the server/network

6(b) Any two from: 2

 Encryption
 Password
 Two-step / Two-factor authentication/verification
 Biometric device
 Anti-malware // Anti-virus
 Proxy-server

© UCLES 2022 Page 10 of 13


0478/12 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

6(c) One mark for identifying an issue, one mark for suggesting a suitable prevention 6

 Power surge/loss (damages hardware)


 Use a UPS

 Water can be spilled on the device


 Don’t have water near the device
 Keep device in a waterproof box when not is use

 Fire can destroy device


 Use electrics safety
 Keep device in a fireproof box when not is use

 Data is accidentally deleted


 Add verification method for data deletion
 Set access levels for data to limit who can delete the data

 Incorrect use of storage device


 Making sure device is ejected before removing

 Physical damage to hardware // hardware failure


 Correct care and maintenance of hardware

 Software failure
 Making sure it is always up to date // enable automatic updates

© UCLES 2022 Page 11 of 13


0478/12 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

7(a) Three from: 3

 CD
 DVD
 Blu-ray

7(b) One mark for each correct row 6

Type of storage

Statement Magnetic Optical Solid


() () state
()

this storage has no moving parts 

this storage uses a laser to read and write data 

this storage uses a read/write head  

this storage burns pits onto a reflective surface 

this storage uses NAND and NOR technology 

this storage stores data in tracks and sectors  ()

© UCLES 2022 Page 12 of 13


0478/12 Cambridge IGCSE – Mark Scheme May/June 2022
PUBLISHED
Question Answer Marks

8(a) Any four from: 4

 Trial version of software


 … for a limited time / number of uses
 … with limited features
 … free of charge
 If full version is required need to pay fee / sign up // When trial over user is asked to pay / sign up
 Protected by copyright
 Type of software licence

8(b) Any three from: 3

e.g.
 Copyright
 Plagiarism
 Production/distribution of malware
 Intellectual property theft
 Privacy of data
 Age appropriation
 Offensive materials
 Environmental impact of distribution media e.g. CDs
 Accessibility of software
 Security of software
 Following guidelines of professional bodies e.g. ACM/IEEE/BCS

© UCLES 2022 Page 13 of 13


Cambridge IGCSE™
* 6 5 6 8 1 1 8 8 5 0 *

COMPUTER SCIENCE 0478/22


Paper 2 Problem-solving and Programming May/June 2022

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Do not attempt Tasks 1, 2 and 3 in the copy of the pre-release material on page 2; these are for
information only.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 50.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 12 pages.

DC (PQ) 303914/4
© UCLES 2022 [Turn over
2

Section A

You are advised to spend no longer than 40 minutes answering this section.

Here is a copy of the pre-release material.

DO NOT attempt Tasks 1, 2 and 3 now.

Use the pre-release material and your experience from attempting the following tasks before the
examination to answer Question 1.

Pre-release material
A program is needed to allow a Wildlife Park to sell tickets. A booking consists of one or more tickets for
the same day(s) and can be made up to a week in advance. A booking can be made for a visit of one day
or two consecutive days. A booking can have extra attractions included. A booking will be valid for the
day(s) chosen only.

Ticket type Cost for one day Cost for two days
one adult $20.00 $30.00
one child (an adult may bring up to two children) $12.00 $18.00
one senior $16.00 $24.00
family ticket (up to two adults or seniors, and three children) $60.00 $90.00
groups of six people or more, price per person $15.00 $22.50

Extra attraction Cost per person


lion feeding $2.50
penguin feeding $2.00
evening barbecue (two-day tickets only) $5.00

Write and test a program or programs for the Wildlife Park:


• Your program or programs must include appropriate prompts for the entry of data. Data must be
validated on entry.
• All outputs, including error messages, need to be set out clearly and understandably.
• All variables, constants and other identifiers must have meaningful names.

You will need to complete these three tasks. Each task must be fully tested.

Task 1 – displaying the ticket options and the extra attractions available
Set up your program to:
• display the options, attractions and prices for one-day tickets
• display the options, attractions and prices for two-day tickets
• show the days available for booking; assume that there are tickets available for any valid day.

Task 2 – process a booking


Extend your program for Task 1 to:
• input the tickets and extra attractions required, then calculate the total cost of the booking
• allocate a unique booking number
• display the booking details, including the total cost and the unique booking number
• repeat as required.

Task 3 – ensuring each booking is the best value


Check that the total for each booking gives the best value and offer an alternative if this is not the case.
For example, buying two family tickets is better than a group ticket for a group of 10 that includes
four adults and six children.
© UCLES 2022 0478/22/M/J/22
3

1 All variables, constants and other identifiers must have meaningful names.

(a) (i) Identify one constant that you could have used for Task 1.
Give the value and use of the constant.

Constant ............................................................................................................................

Value .................................................................................................................................

Use ....................................................................................................................................

...........................................................................................................................................
[3]

(ii) Identify one variable that you could have used for Task 2.
Give the data type and use of the variable.

Variable .............................................................................................................................

Data type ...........................................................................................................................

Use ....................................................................................................................................

...........................................................................................................................................
[3]

(b) Explain how your program showed the days available for booking in Task 1.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(c) Explain how your program made sure that each booking number allocated in Task 2 was
unique.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2022 0478/22/M/J/22 [Turn over


4

(d) Write an algorithm for the part of Task 2 that inputs the tickets and extra attractions required
then calculates the total cost of the booking.

Assume that the booking is for a single day.

Use pseudocode, programming statements or a flowchart.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
© UCLES 2022 0478/22/M/J/22
5

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [6]

© UCLES 2022 0478/22/M/J/22 [Turn over


6

(e) Explain how your program decides when a family ticket is better value in Task 3.

Any programming statements that you include in your answer must be fully explained.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

© UCLES 2022 0478/22/M/J/22


7

Section B starts on page 8

© UCLES 2022 0478/22/M/J/22 [Turn over


8

Section B

2 An algorithm allows a user to input their password and checks that there are at least eight
characters in the password. Then, the user is asked to re-input the password to check that both
inputs are the same. The user is allowed three attempts at inputting a password of the correct
length and a matching pair of passwords. The pre-defined function LEN(X) returns the number of
characters in the string, X

01 Attempt 0 ←
02 REPEAT
03 PassCheck TRUE ←
04 OUTPUT "Please enter your password "
05 INPUT Password
06 IF LEN(Password) < 8
07 THEN
08 PassCheck TRUE ←
09 ELSE
10 OUTPUT "Please re-enter your password "
11 INPUT Password2
12 IF Password <> Password
13 THEN
14 PassCheck FALSE ←
15 ENDIF
16 ENDIF
17 Attempt ←
Attempt + 1
18 UNTIL PassCheck OR Attempt <> 3
19 IF PassCheck
20 THEN
21 OUTPUT "Password success"
22 ELSE
23 OUTPUT "Password fail"
24 ENDIF

(a) Identify the three errors in the pseudocode and suggest a correction to remove each error.

Error 1 .......................................................................................................................................

Correction .................................................................................................................................

Error 2 .......................................................................................................................................

Correction .................................................................................................................................

Error 3 .......................................................................................................................................

Correction .................................................................................................................................
[3]

© UCLES 2022 0478/22/M/J/22


9

(b) The algorithm includes two types of check on the data input.
Identify and describe each type of check.

Type of check 1 ........................................................................................................................

Description ................................................................................................................................

...................................................................................................................................................

Type of check 2 ........................................................................................................................

Description ................................................................................................................................

...................................................................................................................................................
[4]

(c) Give two sets of test data for this algorithm and a reason for choosing each set.

Each set of test data and its reason must be different.

Set 1 .........................................................................................................................................

Reason .....................................................................................................................................

...................................................................................................................................................

Set 2 .........................................................................................................................................

Reason .....................................................................................................................................

...................................................................................................................................................
[4]

3 (a) Describe a one-dimensional array. Include an example of an array declaration.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(b) Explain how indexing could be used to search for a value stored in a one-dimensional array.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2022 0478/22/M/J/22 [Turn over


10

4 This algorithm checks the temperature of hot food being served to customers.
Error

START

Counter 0
Hot 0
Cold 0
Serve 0

INPUT Temp

Is Temp Yes Error


= –1? ((Hot + Cold) / Counter) * 100

No

Is Temp Yes OUTPUT


Hot Hot + 1
> 86? "Too Hot"

Counter No
Counter + 1 OUTPUT
Error
Is Temp Yes
Cold Cold + 1
< 63?
No
OUTPUT
Serve Serve + 1 "Too Cold"
END

© UCLES 2022 0478/22/M/J/22


11

(a) Complete the trace table for the algorithm using this input data:

75, 78, 84, 87, 91, 80, 75, 70, 65, 62, –1, 20

Counter Hot Cold Serve Temp Error OUTPUT

[7]

(b) State how the final output from the algorithm could be improved.

...................................................................................................................................................

............................................................................................................................................. [1]

(c) Identify the process in the algorithm that is not required.

...................................................................................................................................................

............................................................................................................................................. [1]

© UCLES 2022 0478/22/M/J/22 [Turn over


12

5 A database table, NURSE, is used to keep a record of disposable items worn by veterinary nurses.

This is part of the table:

ItemNumber Description SingleUse Uses StockLevel ReorderLevel

DIG1 Glove (pair) Y 1 500 800

DIA1 Apron Y 1 700 800

DIM5 Hair net Y 1 650 500

DIA2 Apron N 5 25 100

DIS4 Suit N 3 70 50

DIV9 Shoe cover (pair) Y 1 400 250

(a) Complete this query-by-example grid to display only the item number and the description of
single use items, where the stock level is below the reorder level.

Field:

Table:

Sort:

Show:

Criteria:

or:
[4]

(b) Give a reason why the field SingleUse is not required in the table NURSE.

...................................................................................................................................................

............................................................................................................................................. [1]

Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge
Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download
at www.cambridgeinternational.org after the live examination series.

Cambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge
Local Examinations Syndicate (UCLES), which is a department of the University of Cambridge.

© UCLES 2022 0478/22/M/J/22


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™
* 6 1 0 4 1 1 8 3 2 6 *

COMPUTER SCIENCE 0478/12


Paper 1 Theory October/November 2022

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 75.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 12 pages.

DC (MB) 303733/3
© UCLES 2022 [Turn over
2

1 A bus station has a ticket machine.

A customer can use the ticket machine to select and pay for their ticket.

One input device built into the ticket machine is a touch screen.

(a) Identify two other input devices that could be built into the ticket machine.

Input device 1 ...........................................................................................................................

Input device 2 ...........................................................................................................................


[2]

(b) The ticket machine has a help icon that a user can touch to contact customer support.

The ticket machine has an output device that allows the user to hear the customer support
person.

Identify an output device that would be used for this purpose.

............................................................................................................................................. [1]

(c) The touch screen for the ticket machine uses resistive technology.

(i) Describe how resistive touch screen technology operates to recognise a user’s touch.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [4]

© UCLES 2022 0478/12/O/N/22


3

(ii) Give two benefits of using resistive touch screen technology for the ticket machine.

Benefit 1 ............................................................................................................................

...........................................................................................................................................

Benefit 2 ............................................................................................................................

...........................................................................................................................................
[2]

(iii) Give two drawbacks of using resistive touch screen technology for the ticket machine.

Drawback 1 .......................................................................................................................

...........................................................................................................................................

Drawback 2 .......................................................................................................................

...........................................................................................................................................
[2]

(iv) Identify one other touch screen technology that could have been used.

..................................................................................................................................... [1]

(d) The computer in the ticket machine uses the stored program concept.

Describe the stored program concept.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2022 0478/12/O/N/22 [Turn over


4

(e) The computer in the ticket machine has an operating system.

One function of the operating system is to provide an interface for the user.

State three other functions of the operating system.

Function 1 .................................................................................................................................

Function 2 .................................................................................................................................

Function 3 .................................................................................................................................
[3]

(f) The computer uses 12-bit binary registers to store data whilst it is being processed.

Customers are given a denary ticket number.

(i) Give the 12-bit binary value that is stored in the register for each denary ticket number.

100 ....................................................................................................................................

235 ....................................................................................................................................

301 ....................................................................................................................................

Working space

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[3]

© UCLES 2022 0478/12/O/N/22


5

(ii) Show the denary ticket number that would be given to the customer for each 12-bit binary
value.

000000010110 ...................................................................................................................

000001110111 ...................................................................................................................

001101011001 ...................................................................................................................

Working space

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[3]

(iii) Binary values can also be represented as hexadecimal values.

Show the hexadecimal value that represents each of the two 12-bit binary values.

000010010101 ..................................................................................................................

101011010001 ...................................................................................................................

Working space

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[4]

© UCLES 2022 0478/12/O/N/22 [Turn over


6

2 An automated water tap system uses a sensor and a microprocessor to operate. Water flows
from the tap when a person’s hands are placed underneath the tap. Water stops flowing when the
person’s hands are removed from underneath the tap.

(a) Explain how the water tap system uses a sensor and a microprocessor to operate.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [6]

(b) Three descriptions are shown of different systems.

Identify the most suitable sensor that could be used in each system.

Description of system Sensor

it checks the air is dry enough in a garage that spray paints cars

it automatically switches on the headlights on a car when it is dark

it checks that the soil in a greenhouse has the correct level of acidity

[3]

© UCLES 2022 0478/12/O/N/22


7

3 Five statements are shown about Random Access Memory (RAM), an internal
Solid State Drive (SSD) and a USB flash memory drive.

Tick (✓) to show which statements apply to each component. Some statements may apply to
more than one component.

Component
Internal USB flash
RAM
Statement SSD memory drive
(✓)
(✓) (✓)

it is a type of primary storage

it is volatile

it uses NAND and NOR technology

it does not have any moving parts

it is not directly connected to the


central processing unit (CPU)
[5]

4 Doris has data stored on her computer.

She accidentally loses some data by deleting a file.

State two methods she could use to help prevent accidental loss of data in this way.

Describe how each method would help prevent accidental loss of the data.

Method 1 ..........................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

Method 2 ..........................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
[4]

© UCLES 2022 0478/12/O/N/22 [Turn over


8

5 8 bytes of data are transmitted from one computer to another. Each byte of data has a parity bit.

The data is also sent with a parity byte. Each bit in the parity byte allows a check to be performed
on each column of bits.

A parity check is performed on the data and an error is found in one bit. The table shows the data
that was received.

Parity
Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Bit 8
bit

Byte 1 0 1 0 1 0 0 1 1

Byte 2 1 0 0 1 1 1 1 1

Byte 3 1 1 1 1 1 1 0 0

Byte 4 1 1 0 1 0 1 0 1

Byte 5 1 0 0 0 1 1 1 0

Byte 6 1 1 1 0 1 0 1 1

Byte 7 1 1 0 0 1 1 0 0

Byte 8 1 1 1 1 0 0 1 1

Parity
1 0 1 1 0 1 1 1
byte

Identify which bit has an error by giving the Byte number and Bit number.

Explain how you found the error.

Byte number ..............................

Bit number .................................

Explanation ......................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................
[4]

© UCLES 2022 0478/12/O/N/22


9

6 Jian has a website that uses the Secure Socket Layer (SSL) protocol to make sure that data is
kept secure during transmission.

(a) Give two ways that a user could check that a website uses the SSL protocol.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................
[2]

(b) State the name of the updated version of the SSL protocol.

............................................................................................................................................. [1]

(c) Jian’s system for his website has a proxy server.

Explain why Jian uses a proxy server as part of the system for his website.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2022 0478/12/O/N/22 [Turn over


10

(d) Jian sells products using his website. He wants to create a secure login system for user
accounts.

He is worried that a user’s login details may be gathered by malware when they are logging
into their account.

(i) State the type of malware that could be used to gather a user’s login details.

..................................................................................................................................... [1]

(ii) Give three methods that could be used to help prevent a user’s login details being
gathered by malware, when they are logging into their account.

Describe how each method can help prevent this happening.

Method 1 ...........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

Method 2 ...........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

Method 3 ...........................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[6]

© UCLES 2022 0478/12/O/N/22


11

(e) The paragraph describes how the web pages are obtained and displayed for the user.

Complete the paragraph using the list of terms. Not all terms in the list need to be used.

• browser
• Hypertext Markup Language (HTML)
• Internet Protocol (IP) address
• Internet Service Provider (ISP)
• Media Access Control (MAC) address
• presentation
• protocols
• structure
• Uniform Resource Locator (URL)
• web pages
• web server

The browser sends the ....................................................................................... to the

Domain Name Server (DNS) that looks up the corresponding

..................................................................................... . This is returned to the browser, which

then sends a request to the ...................................................................................... where the

.......................................................................................... are stored. The website is written in

.......................................................................................... that is rendered by the

.......................................................................................... .
[6]

7 NAND, OR and XOR are three types of logic gate.

(a) Four statements are shown about the logic gates.

Tick (✓) to show which statements apply to each logic gate. Some statements may apply to
more than one logic gate.

NAND OR XOR
Statement
(✓) (✓) (✓)

if both inputs are 1, the output is 1

if both inputs are different from each other, the output is 1

if both inputs are 0, the output is 0

if both inputs are the same as each other, the output is always 0

[4]

© UCLES 2022 0478/12/O/N/22 [Turn over


12

(b) NAND, OR, XOR, NOR and NOT are all examples of logic gates.

State the name of one other logic gate and complete its truth table.

Logic gate .................................................... Truth table:

A B Output

0 0

0 1

1 0

1 1
[2]

Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge
Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download
at www.cambridgeinternational.org after the live examination series.

Cambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge
Local Examinations Syndicate (UCLES), which is a department of the University of Cambridge.

© UCLES 2022 0478/12/O/N/22


Cambridge IGCSE™

COMPUTER SCIENCE 0478/12


Paper 1 Theory October/November 2022
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 2022 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 2022 [Turn over


0478/12 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 13


0478/12 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 13


0478/12 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

1(a) Any two from: 2

• Keyboard
• Trackpad
• Trackball
• Microphone
• Keypad
• Sensor
• Button
• Barcode/QR scanner/reader
• Webcam/digital camera

1(b) Any one from: 1

• Speaker
• Headphones

1(c)(i) Any four from: 4

• The screen is made up of (two) layers/multiple layers


• The user pushes the top layer into the bottom layer // The user pushes the layers together
• The layers create a circuit (when pushed together)
• causing electricity to flow
• allowing the co-ordinates/location of the users touch to be calculated

1(c)(ii) Any two from: 2

• Cheap to manufacture/buy
• Can still be used whilst wearing gloves
• Waterproof // Can be used in bad weather
• Does not easily shatter
• Low power consumption
• (Can) support multitouch

© UCLES 2022 Page 4 of 13


0478/12 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

1(c)(iii) Any two from: 2

• Does not (normally) support multitouch


• Screen visibility can be poor in sunlight
• Longevity issues
• (Normally) lower resolution
• Not very sensitive to touch // Lower response time (than capacitive)
• Prone to scratches

1(c)(iv) Any one from: 1

• Capacitive
• Infrared

1(d) Any two from: 2

• Data and instructions are stored in the same memory


• and can only be fetched one at a time

1(e) Any three from: 3

• Multitasking
• Multiprogramming
• Input and output control
• Running software
• Memory management
• Processor management
• File management
• Handling interrupts
• Providing security
• Managing user accounts
• Batch / real-time processing

© UCLES 2022 Page 5 of 13


0478/12 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

1(f)(i) • 000001100100 3
• 000011101011
• 000100101101

1(f)(ii) • 22 3
• 119
• 857

1(f)(iii) One mark for two correct characters in the correct place, two marks for three 4

• 095
• AD1

© UCLES 2022 Page 6 of 13


0478/12 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

2(a) Six from: 6

• Motion/proximity/infra-red sensor is used


• Sensor sends data to microprocessor
• Data is converted from analogue to digital (using ADC)
• Data is compared to stored/set value(s)
• If data is inside range/outside range/greater than/less than, signal is sent to turn water tap on
• If data is outside range /inside range/less than/greater than, tap remains off / signal is sent to turn water tap off
• Actuator is used to turn the tap off/on
• Whole process is continuous

2(b) One mark for each correct sensor 3

Description of system Sensor

it checks the air is dry enough in a garage that spray paints Moisture/humidity
cars

it automatically switches on the headlights on a car when it is Light


dark

it checks that the soil in a greenhouse has the correct level of pH


acidity

© UCLES 2022 Page 7 of 13


0478/12 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

3 One mark for each correct row 5


Component

Statement RAM Internal USB flash


(✓) SSD memory drive
(✓) (✓)

it is a type of primary storage ✓

it is volatile ✓

it uses NAND and NOR technology ✓ ✓

it does not have any moving parts ✓ ✓ ✓

it is not directly connected to the ✓ ✓


Central Processing Unit (CPU)

© UCLES 2022 Page 8 of 13


0478/12 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

4 One mark for the method, one mark for a corresponding description 4

• Create a back-up
• this means the data can be restored/recovered
• Add verification
• to get the user to confirm they want to delete the data
• Set access rights
• so that she cannot delete any files

© UCLES 2022 Page 9 of 13


0478/12 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

5 One mark each for the correct byte and bit 4

• Byte 4
• Bit 5

Any two from:

• Counted all the 1s


• An even parity has been used
• Odd number of ones in that row (byte 4) and column (bit 5)

© UCLES 2022 Page 10 of 13


0478/12 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

6(a) Any two from: 2

• Check if web address starts with HTTPS


• Check if there is a locked padlock
• Check the digital certificate for the website

6(b) • Transport layer security // TLS 1

6(c) Any four from: 4

• To act as intermediary between browser and web server


• to filter/examine/monitor traffic to the web server
• to help stop malicious traffic to the web server
• To cache frequently viewed web pages
• to allow faster response time for requests
• to reduce the number of requests the server needs to process
• To help prevent DoS
• stopping the webserver being overloaded with requests
• by redirecting away from server // by stopping DoS attack reaching server
• To act as a firewall

6(d)(i) • Spyware 1

© UCLES 2022 Page 11 of 13


0478/12 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

6(d)(ii) One mark for a correct method, one mark for a corresponding description 6

• Drop down boxes


• this means that the keypresses cannot be recorded
• Onscreen/virtual keyboard
• this means that the keypresses cannot be recorded
• Biometrics // by example
• this means that the keypresses cannot be recorded
• no password entered to be gathered
• Anti-malware // anti-spyware
• this will scan for/remove any malware that could be recording keypresses
• Random/select values requested from password
• this means that full password cannot be obtained (in a single login)
• Firewall
• to prevent the download of any malware that could gather keypresses

6(e) One mark for each correct term in the correct order 6

• URL
• IP address
• Web server
• Web pages
• HTML
• Browser

© UCLES 2022 Page 12 of 13


0478/12 Cambridge IGCSE – Mark Scheme October/November 2022
PUBLISHED
Question Answer Marks

7(a) One mark for each correct row 4

NAND OR XOR
Statement
(✓) (✓) (✓)

if both inputs are 1, the output is 1 ✓

if both inputs are different from each other, the output is 1 ✓ ✓ ✓

if both inputs are 0, the output is 0 ✓ ✓

if both inputs are the same as each other, the output is always 0 ✓

7(b) One mark for a correct logic gate, one mark for a corresponding truth table 2

• AND
A B Output

0 0 0

0 1 0

1 0 0

1 1 1

© UCLES 2022 Page 13 of 13


Cambridge IGCSE™
* 6 4 3 7 4 4 2 5 4 7 *

COMPUTER SCIENCE 0478/22


Paper 2 Problem-solving and Programming October/November 2022

1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

INSTRUCTIONS
● Answer all questions.
● Do not attempt Tasks 1, 2 and 3 in the copy of the pre-release material on page 2; these are for
information only.
● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
● Write your name, centre number and candidate number in the boxes at the top of the page.
● Write your answer to each question in the space provided.
● Do not use an erasable pen or correction fluid.
● Do not write on any bar codes.
● Calculators must not be used in this paper.

INFORMATION
● The total mark for this paper is 50.
● The number of marks for each question or part question is shown in brackets [ ].
● No marks will be awarded for using brand names of software packages or hardware.

This document has 16 pages. Any blank pages are indicated.

DC (CJ/CB) 303988/3
© UCLES 2022 [Turn over
2

Section A

You are advised to spend no longer than 40 minutes answering this section.

Here is a copy of the pre-release material.

DO NOT attempt Tasks 1, 2 and 3 now.

Use the pre-release material and your experience from attempting the following tasks before the
examination to answer Question 1.

Pre-release Material

An organisation has a visitor car park with 20 car parking spaces numbered 1 to 20. Car park
spaces can be booked by visitors up to two weeks before the date they are needed, as long as a
space is available. Visitors request a car parking space by stating the day in the two-week period in
which it is required. They give the licence number of the car to be parked and their name. The next
available space, beginning at space 1, is allocated and the given data and booking are stored. A
system is required to record the car park bookings.
Write and test a program or programs for the visitor car park booking system to work for a static
period of two weeks:
• Your program or programs must include appropriate prompts for the entry of data. Data must
be validated on entry.
• All outputs, including error messages, need to be set out clearly and understandably.
• All variables, constants and other identifiers must have meaningful names.
You will need to complete these three tasks. Each task must be fully tested.
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.
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.
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 0478/22/O/N/22
3

1 All variables, constants and other identifiers must have meaningful names.

(a) (i) Identify one constant you could have used for Task 1 and state its value.

Constant ............................................................................................................................

Value .................................................................................................................................
[2]

(ii) Identify one array you could have used in Task 1 and describe its use.

Array ..................................................................................................................................

Use ....................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
[2]

(b) Describe how your program could validate the input for the day number within the two-week
period to make sure an appropriate value is entered (part of Task 1).

You must include programming statements as part of your answer.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

© UCLES 2022 0478/22/O/N/22 [Turn over


4

(c) Write an algorithm to show how your program allocates a parking space if the visitor requires
accessible parking (part of Task 2), including all relevant input and output, using pseudocode,
programming statements or a flowchart.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................
© UCLES 2022 0478/22/O/N/22
5

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [6]

© UCLES 2022 0478/22/O/N/22 [Turn over


6

(d) Explain how your program in Task 2 could be altered so that bookings can be made for
any time over a four-week period instead of the current two-week period. Any programming
statements used in your answer must be fully explained.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(e) Explain how your program records and outputs the number of accessible and general parking
spaces used for the two-week period (part of Task 3). Any programming statements used in
your answer must be fully explained.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]
© UCLES 2022 0478/22/O/N/22
7

Section B

2 Draw a line to connect each programming concept to the most appropriate description.

Programming concept Description

carrying out an action multiple times within a loop


structure

counting

adding together the numbers in a list of numbers


repetition

tracking the number of iterations a program has


selection 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

[4]

3 Describe the use of verification on input of data when entering a list of items in stock into a
database. Explain why verification is necessary.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

.................................................................................................................................................... [3]

4 Describe one type of test data that must be used to test if a program accepts valid input data.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

.................................................................................................................................................... [2]

© UCLES 2022 0478/22/O/N/22 [Turn over


8

5 This pseudocode should allow 500 marks to be entered into the algorithm. If the mark is 80 or
greater it is stored in an array for higher marks. If the mark is less than 80, but greater than or
equal to 50 it is stored in an array for middle marks. The remaining marks are stored in an array
for lower marks. The results from the algorithm are displayed at the end.

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] MarksEntry
10 HighList HighList + 1
11 ELSE
12 IF Mark >= 50
13 THEN
14 Middle[MidList] Mark
15 MidList MidList
16 ELSE
17 Lower[HighList] Mark
18 LowList LowList + 1
19 ENDIF
20 ENDIF
21 MarksEntry MarksEntry + 1
22 NEXT MarksEntry = 500
23 OUTPUT "You entered ", HighList, " higher marks"
24 OUTPUT "You entered ", MidList, " middle marks"
25 OUTPUT "You entered ", LowList, " lower marks"

(a) Identify the four errors in the pseudocode and suggest a correction for each error.

Error 1 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 2 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 3 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................

Error 4 .......................................................................................................................................

Correction .................................................................................................................................

...................................................................................................................................................
[4]
© UCLES 2022 0478/22/O/N/22
9

(b) The corrected algorithm needs to be changed so that any number of marks may be entered
and the algorithm runs until the user tells it to stop.

Write the new pseudocode statements that would be needed to achieve this and state where
in the algorithm they would be placed.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [4]

© UCLES 2022 0478/22/O/N/22 [Turn over


10

6 This flowchart represents an algorithm to divide three-digit numbers into hundreds, tens and units.

The pre-defined function DIV gives the value of the result of integer division, for example
Y = 9 DIV 4 gives the value Y = 2

The pre-defined function MOD gives the value of the remainder of integer division, for example
R = 9 MOD 4 gives the value R = 1

START

Counter 0

Counter Counter + 1

Yes IS
Counter > 7?

No

INPUT
Number

IS Yes
Number < 100?

No

IS Yes
Number > 999?

No

Hundreds Number DIV 100

Temp Number MOD 100

Tens Temp DIV 10

Units Number MOD 10


STOP

OUTPUT "Hundreds: ",


Hundreds, " Tens: ",
Tens, " Units: ", Units

© UCLES 2022 0478/22/O/N/22


11

Complete the trace table for the algorithm using this input data:

97, 876, 4320, 606, 9875, 42, 124

Counter Number Hundreds Temp Tens Units OUTPUT

[5]

© UCLES 2022 0478/22/O/N/22 [Turn over


12

7 A school uses a database table, ASSESS, to keep a record of the internal assessments and the
number of candidates for each of the subjects in its curriculum.

SubjectCode SubjectName Exams Practicals Candidates


COMP Computer Science 2 1 200
INFO Information Technology 1 2 200
MATH Mathematics 3 0 350
PHYS Physics 2 1 120
CHEM Chemistry 2 1 120
BIOL Biology 2 1 200
GEOG Geography 2 0 200
HIST History 2 0 250
GEOL Geology 2 0 80
PHED Physical Education 1 2 350
FREN French 2 2 120
ENGL English 2 2 350

This database only allows the data types:


• text
• number
• currency
• Boolean.

(a) (i) State the most appropriate data type for the fields SubjectCode and Exams.

SubjectCode ......................................................................................................................

Exams ...............................................................................................................................
[1]
(ii) State one reason why the Candidates field could not be of the Boolean data type.

...........................................................................................................................................

..................................................................................................................................... [1]

© UCLES 2022 0478/22/O/N/22


13

(b) Show the output given by the query-by-example grid.

Field: SubjectName Practicals Candidates

Table: ASSESS ASSESS ASSESS

Sort: Ascending

Show: 3 3

Criteria: <1

or:

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [3]

(c) Complete the query-by-example grid to output the subjects with fewer than 150 candidates.
Display only the SubjectCode, SubjectName and Candidates fields in order of the number of
candidates from largest to smallest.

Field:

Table:

Sort:

Show:

Criteria:

or:
[3]

© UCLES 2022 0478/22/O/N/22


14

BLANK PAGE

© UCLES 2022 0478/22/O/N/22


15

BLANK PAGE

© UCLES 2022 0478/22/O/N/22


16

BLANK PAGE

Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge
Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download
at www.cambridgeinternational.org after the live examination series.

Cambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge
Local Examinations Syndicate (UCLES), which is a department of the University of Cambridge.

© UCLES 2022 0478/22/O/N/22


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

You might also like