0% found this document useful (0 votes)
10 views148 pages

Comp SC 2021

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)
10 views148 pages

Comp SC 2021

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

Cambridge IGCSE™

* 0 8 0 3 7 2 8 9 4 0 *

COMPUTER SCIENCE 0478/12


Paper 1 Theory February/March 2021

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 16 pages. Any blank pages are indicated.

DC (PQ/SG) 202679/4
© UCLES 2021 [Turn over
2

1 A hockey club records the number of people that watch each match. An 8-bit binary register is
used to store this value.

(a) 46 people watch the first match and 171 people watch the second match.

Show how the registers would store these denary values as 8-bit binary.

Denary
8-bit binary
value
46

171
[2]

Working space

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

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

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

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

(b) Give the largest denary value that can be stored in the 8-bit binary register.

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

(c) The hockey club wants to increase the number of people that can watch each match to 2000.
The 8-bit binary register may no longer be able to store the value.

Give the smallest number of bits that can be used to store the denary value 2000.

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

Working space

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

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

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

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

© UCLES 2021 0478/12/F/M/21


3

(d) Electronic data about the final score for the match is transmitted to a central computer
30 kilometres away, using serial transmission.

(i) Explain why serial transmission is more appropriate than parallel transmission in this
scenario.

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

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

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

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

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

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

(ii) The data transmission is also half-duplex.

Describe half-duplex data transmission.

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

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

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

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

(iii) The data transmission uses checksums.

Describe how checksums are used to detect errors in data transmission.

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

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

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

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

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

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

© UCLES 2021 0478/12/F/M/21 [Turn over


4

2 Gurdeep takes high definition photographs using a digital camera. She has set up a website where
users can view thumbnails of her photographs. A thumbnail is a small version of the high definition
photograph.

(a) Gurdeep compresses the high definition photographs to create the thumbnails. She uses
lossy compression.

Describe how lossy compression creates the thumbnails.

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

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

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

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

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

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

(b) Gurdeep sets up a web server to host her website. She reads about an Internet Protocol (IP)
address, a Media Access Control (MAC) address and a Uniform Resource Locator (URL).

Draw a line to connect each term to the correct example.

Term Example

IP address 192.168.0.255

MAC address https://www.cambridgeinternational.org

URL 00:15:E9:2B:99:3C

[2]

© UCLES 2021 0478/12/F/M/21


5

(c) Users can buy the high definition photographs from the website. When a user buys a high
definition photograph, a Secure Socket Layer (SSL) connection is created.

(i) Give one benefit of using an SSL connection.

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

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

(ii) Explain how the SSL connection is created.

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

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

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

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

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

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

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

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

© UCLES 2021 0478/12/F/M/21 [Turn over


6

3 The given table shows the name or description of four devices. The table is incomplete.

Complete the missing device names and descriptions.

Device name Description

................................................... Uses either thermal bubble or piezoelectric technology

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

...............................................................................................
Actuator
...............................................................................................

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

Uses thousands of tiny mirrors that can move very quickly to


...................................................
create an image

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

...............................................................................................
Mouse
...............................................................................................

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

© UCLES 2021 0478/12/F/M/21


7

4 A supermarket sells many products. Each product has a barcode.

(a) Explain how the barcode is read at the supermarket checkout and how the price of the product
is found.

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

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

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

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

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

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

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

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

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

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

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

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

(b) The supermarket stores data using a Solid State Drive (SSD).

(i) Explain how an SSD stores data.

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

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

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

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

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

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

(ii) One advantage of an SSD rather than a Hard Disk Drive (HDD) is that it has no moving
parts, so it is more durable.

State one other advantage of the supermarket using SSD rather than HDD.

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

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

© UCLES 2021 0478/12/F/M/21 [Turn over


8

5 Computers use logic gates.

(a) State the single logic gate that produces each truth table.

Truth table Logic gate

A B Output

0 0 1

0 1 1 ...................................................................................
1 0 1

1 1 0

A B Output

0 0 0

0 1 1 ...................................................................................
1 0 1

1 1 0

A B Output

0 0 1

0 1 0 ...................................................................................
1 0 0

1 1 0

[3]

(b) An aeroplane has a warning system that monitors the height of the aeroplane above the
ground, whether the aeroplane is ascending or descending, and the speed of the aeroplane.

Input Binary value Condition

Height 1 Height is less than 500 metres


(H) 0 Height is greater than or equal to 500 metres
Ascending or 1 Aeroplane is ascending or in level flight
Descending
(A) 0 Aeroplane is descending

Speed 1 Speed is less than or equal to 470 knots


(S) 0 Speed is greater than 470 knots

© UCLES 2021 0478/12/F/M/21


9

The warning system will produce an output of 1 that will sound an alarm (W) when either of
these conditions apply:

Height is less than 500 metres and the aeroplane is descending

or

The aeroplane is descending and speed is greater than 470 knots

Draw a logic circuit to represent the warning system.

A W

[5]

© UCLES 2021 0478/12/F/M/21 [Turn over


10

6 Hacking is one type of Internet risk used to obtain personal data that is stored on a computer.

(a) Explain how a firewall can help prevent hacking.

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

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

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

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

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

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

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

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

(b) Identify and describe two other types of internet risk that are used to obtain personal data.

Internet risk 1 ............................................................................................................................

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

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

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

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

Internet risk 2 ............................................................................................................................

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

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

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

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

© UCLES 2021 0478/12/F/M/21


11

7 Adeel has used a high-level language to program a mobile application.

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

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

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

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

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

(b) Adeel uses an interpreter while developing and testing the application.

Adeel uses a compiler when the application is ready to be shared with others.

Compare the features of interpreters and compilers.

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

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

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

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

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

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

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

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

(c) Adeel is considering distributing his application as free software or shareware.

Explain the difference between free software and shareware.

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

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

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

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

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

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

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

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

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

............................................................................................................................................. [5]
© UCLES 2021 0478/12/F/M/21 [Turn over
12

(d) Adeel is concerned about his application being plagiarised.

Define the term plagiarism.

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

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

(e) Adeel copyrights his application.

State why Adeel copyrights his application.

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

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

© UCLES 2021 0478/12/F/M/21


13

8 The Von Neumann model, for a computer system, uses the stored program concept.

(a) Describe what is meant by the stored program concept.

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

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

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

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

(b) The fetch-execute cycle of a Von Neumann model, for a computer system, uses registers and
buses.

(i) Describe the role of the Program Counter.

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

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

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

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

(ii) Describe the role of the Control Bus.

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

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

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

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

(c) Computers based on the Von Neumann model, for a computer system, use interrupts.

Explain why interrupts are needed.

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

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

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

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

© UCLES 2021 0478/12/F/M/21


14

BLANK PAGE

© UCLES 2021 0478/12/F/M/21


15

BLANK PAGE

© UCLES 2021 0478/12/F/M/21


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 the Cambridge Assessment Group. Cambridge Assessment is the brand name of the University of
Cambridge Local Examinations Syndicate (UCLES), which itself is a department of the University of Cambridge.

© UCLES 2021 0478/12/F/M/21


Cambridge IGCSE™

COMPUTER SCIENCE 0478/12


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

This document consists of 10 printed pages.

© UCLES 2021 [Turn over


0478/12 Cambridge IGCSE – Mark Scheme March 2021
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.

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 2021 Page 2 of 10


0478/12 Cambridge IGCSE – Mark Scheme March 2021
PUBLISHED

Question Answer Marks

1(a) 1 mark each 2


Denary Value 8-bit binary

46 0 0 1 0 1 1 1 0

171 1 0 1 0 1 0 1 1

1(b) − 255 1

1(c) − 11 1

1(d)(i) Any three from: 3


− More accurate/reliable/efficient over long distances
− Less chance of interference / cross talk
− …that will skew / distort the data // less likely to get errors
− Data will arrive in order
− Serial is cheaper to purchase/install/maintain

1(d)(ii) − Transmission in both directions … 2


− …not at the same time // asynchronous

1(d)(iii) Any three from: 3


− Calculates a value from the bits/data (to be transferred) // by
example/description
− Value is appended to the bits/data
− Value is transferred with the bits/data
− Receiver recalculates the checksum
− If both values are different error is detected // if both values are the same
the transmission is successful

Question Answer Marks

2(a) Any three from: 3


− A compression algorithm is used
− Data will be lost/deleted permanently // original file cannot be recreated
− Reduce the range of colours used / colour depth / bits per pixel
− Reduce the number of pixels / image resolution removes data that will not
be noticed by the user // removes unnecessary data

© UCLES 2021 Page 3 of 10


0478/12 Cambridge IGCSE – Mark Scheme March 2021
PUBLISHED

Question Answer Marks

2(b) 1 mark for 1 line, 2 marks for 3 lines 2


Term Details

IP address 192.168.0.255

MAC address https://www.cambridgeinternational.org

URL 00:15:E9:2B:99:3C

2(c)(i) − Data if intercepted cannot be understood // Data is encrypted // Data is 1


scrambled // uses keys to encode/decode data

2(c)(ii) Four from: 4


− Uses (digital) certificates
− ….requested from web server by browser/client // browser/client asks web
server to identify itself
− Server send SSL/digital signature to browser/client
− Client and server agree on encryption method to use
− … that contains the server's public key
− Browser checks authenticity of certificate…
− … then session key is generated
− … the transaction will begin // sends signal to server to start transmission

© UCLES 2021 Page 4 of 10


0478/12 Cambridge IGCSE – Mark Scheme March 2021
PUBLISHED

Question Answer Marks

3 One mark for each device/description 4


Name of
Description
device

Inkjet Printer Uses either thermal bubble or piezoelectric technology

Actuator − Operated by signals to cause a physical


movement Controls the movement of a
machine // by example

DLP//Projector Uses thousands of tiny mirrors that can move very


quickly to create an image

Mouse − Uses rolling ball / optical sensor / laser to


detect motion // by example
− Movement echoed on screen // moves
curser/pointer (on screen)
− Has scroll wheel / Buttons to allow data input
// by example

Question Answer Marks

4(a) Six from 6


Max four from:
− Scanned using a barcode reader
− Shines (red) laser/light
− Light is reflected back // white lines reflect light // black lines reflect less
light
− Sensors/photoelectric cells detect the light
− Different reflections/bars give different binary/digital values // (pattern)
converted to binary/digital values
− Microprocessor interprets the data
− Uses check digit error checking

Max three from:


− Database stores data/barcodes/products/prices
− Barcode/value/key transmitted to database/system // Searches for
barcode/value/key in the database/system…
− … price is returned/found

© UCLES 2021 Page 5 of 10


0478/12 Cambridge IGCSE – Mark Scheme March 2021
PUBLISHED

Question Answer Marks

4(b)(i) Max three from: 3


− Flash storage
− Uses transistors/controls gates/floating gates
− Can be NAND/NOR technology // Can use flip-flops
− Stores data by flashing it onto the chips/device
− Controlling/using the flow of electrons through/using
transistors/chips/gates
− The electric current reaches the control gate and flows through to the
floating gate to be stored
− When data is stored the transistor is converted from 1 to 0 / 0 to 1

4(b)(ii) Max one from: 1


− Faster read/write operation
− Produces less heat // needs less cooling
− Less susceptible to interference/magnets
− Less power consumption

© UCLES 2021 Page 6 of 10


0478/12 Cambridge IGCSE – Mark Scheme March 2021
PUBLISHED

Question Answer Marks

5(a) 3
Truth table Logic gate

NAND [1]
A B Output

0 0 1

0 1 1

1 0 1

1 1 0

XOR / Exclusive OR [1]


A B Output

0 0 0

0 1 1

1 0 1

1 1 0

NOR [1]
A B Output

0 0 1

0 1 0

1 0 0

1 1 0

© UCLES 2021 Page 7 of 10


0478/12 Cambridge IGCSE – Mark Scheme March 2021
PUBLISHED

Question Answer Marks

5(b) One mark for each logic gates with correct inputs 5

− NOT A
− NOT S
− H AND NOT A
− NOT A AND NOT S
− Final OR

Question Answer Marks

6(a) Any four from: 4


− Monitors incoming and outgoing traffic
− Allows the setting of criteria/blacklist/whitelist/by example
− Blocks access to signals that do not meet
requirements/criteria/blacklist/whitelist …
− … sends signal to warn the user
− Restrict access to specific applications
− Blocks entry/exit by specific ports

6(b) One mark for risk, two marks for description 6

− Phishing
− Legitimate looking email sent to user
− Clicking on link/attachment takes user to fake website

− Pharming
− Software is installed on user’s computer
− Redirects (correct URL) to different/fraudulent website

− Spyware (accept keylogger but do not award for MP3)


− Software is installed on user’s computer
− Records key strokes // keylogger
− Transmits data to third part for analysis

© UCLES 2021 Page 8 of 10


0478/12 Cambridge IGCSE – Mark Scheme March 2021
PUBLISHED

Question Answer Marks

7(a) Any two from: 2


− Makes use of words // close to human language
− Machine independent // portable
− Problem / logic focussed
− Needs to be translated/interpreter/compiled (to low-level for processing by
computer) // needs converting to machine code

7(b) Four from 4


Max 2 for only giving compiler/interpreter features

− Both translate high level / source code to machine code


− Both generate error diagnostics/messages // identify errors

− Interpreter translates one line at a time // checks one line and then runs it
− Compiler translates whole code in one go // checks all code and then runs
it

− Interpreter stops when meets an error


− …and then allows you to continue running from where you stopped //
correct errors in real-time
− Compiler provides list of all errors

− Interpreter does not produce an executable file


− Compiler produces an executable file

7(c) Any five from: 5


− Free software is distributed with the source code
− …whereas shareware is not distributed with the source code

− Free software allows modification of the application


− …whereas shareware cannot be modified

− Shareware normally allows a trial period for the end user // shareware has
limited features to start with

− Free software is often available free of charge


− …whereas shareware normally has a charge after trial period // shareware
has charge to access all features // shareware makes you sign-up/register
after trial period // shareware makes you sign-up/register to access all
features

7(d) − Claiming another person's work as your own 1

7(e) − To identify legal ownership // to claim ownership // protect intellectual 1


property

© UCLES 2021 Page 9 of 10


0478/12 Cambridge IGCSE – Mark Scheme March 2021
PUBLISHED

Question Answer Marks

8(a) − Instructions and data stored in the same/main memory 2


− Instructions fetched and executed in order / one after another / in
sequence

8(b)(i) − Holds the address … 2


− … of next / current instruction

8(b)(ii) Any two from: 2


− Carries / transfers control signals/instructions // carries/transfers
commands …
− … from CPU/CU to components // from devices to CPU/CU
− To synchronise the FE cycle

8(c) Any two from: 2


− To identify that the processor's attention is required // to stop the current
process/task
− To allow multitasking
− To allow for efficient processing // prioritising actions
− To allow for efficient use of hardware
− To allow time-sensitive requests to be dealt with
− To avoid the need to poll devices

© UCLES 2021 Page 10 of 10


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

COMPUTER SCIENCE 0478/22


Paper 2 Problem-solving and Programming February/March 2021

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 (CE/SG) 202680/2
© UCLES 2021 [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 tasks before the examination to
answer Question 1.

Pre-release material

A program is needed for a quiz to help younger students to practise their multiplication tables. There
needs to be two ways of using the quiz; testing and learning.
Testing: the student is given one attempt at answering each question and the score is calculated for
the whole test.
Learning: the student is given up to three attempts to get their answer to each question correct. There
is no scoring.
A student can choose which multiplication table, from 2 to 12, to use for the quiz. There are five
questions in each quiz, each question must use the chosen multiplication table and a different whole
number (from 1 to 12) as the multiplier.
Write and test a program or programs for a multiplication tables quiz.
• Your program or programs must include appropriate prompts for the entry of data; data must be
validated on entry.
• Error messages and other output 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 – Testing a student
Students enter their name and choice of multiplication table. Each question is displayed on the screen
one at a time, for example:

Question 1

2X7=

Students enter their answer and move on to the next question. A running total of correct answers
(score) is kept. At the end of the quiz the student’s name and score are displayed with a personalised
message related to the score, for example:

Aarav your score is 5/5 Diya your score is 3/5

Well done full marks Have another practice

Task 2 – Student learning


Students enter their name and choice of multiplication table. Each question is displayed on the screen
as in Task 1. If an answer is correct, a personalised message containing the student’s name confirms
this, the quiz then moves to the next question. If an answer is incorrect, a personalised message
containing the student’s name and a hint is displayed, for example:

Aarav your answer is too large

Up to three attempts are offered to get each answer correct. After the third incorrect attempt, the correct
answer is displayed and the quiz moves on to the next question.
Task 3 – Varying the quiz
Modify Task 1 to allow students to choose how many questions they would like in the test and if they
would like a ‘mixed’ set of questions. A ‘mixed’ set means that each question can be from a different
multiplication table; from 2 to 12.
© UCLES 2021 0478/22/F/M/21
3

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

(a) Identify the variable that you used to store the student’s answer in Task 1. Give the most
appropriate data type for this variable. Explain how your program ensured that any data
entered for the answer was valid.

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

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

Validation ..................................................................................................................................

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

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

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

(b) Identify and give the data type of a different variable, that you could have used in Task 2.
State the use of this variable in Task 2.

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

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

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

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

© UCLES 2021 0478/22/F/M/21 [Turn over


4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

© UCLES 2021 0478/22/F/M/21


5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

............................................................................................................................................. [6]
© UCLES 2021 0478/22/F/M/21 [Turn over
6

(d) Explain how your program completed Task 3.


Include any programming statements that you have added to Task 1 and fully explain the
purpose of each statement.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

© UCLES 2021 0478/22/F/M/21


7

(e) Explain how you could alter Task 1 to change the quiz to:

• display three alternative answers for each question


• allow the student to choose one of these answers

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

© UCLES 2021 0478/22/F/M/21 [Turn over


8

Section B

2 An algorithm has been written in pseudocode to:

• input 25 positive whole numbers less than 100


• find and output the largest number
• find and output the average of all the numbers

01 A ←0
O2 B ←0
03 C ←0
04 REPEAT
05 REPEAT
06 INPUT D
07 UNTIL D > 0 AND D < 100 AND D = INT(D)
08 IF D > B
09 THEN
10 B D ←
11 ENDIF
12 C ← C + D
13 A ← A + 1
14 UNTIL A >= 25
15 E ←C / A
16 OUTPUT "Largest number is ", B
17 OUTPUT "Average is ", E

(a) Give the line number for the statements showing:

Totalling ....................................................................................................................................

Counting ...................................................................................................................................

Range check .............................................................................................................................

Calculating the average ............................................................................................................


[4]

(b) State an example for each type of test data needed to test the input of the number:

Normal test data example .........................................................................................................

Erroneous/abnormal test data example ....................................................................................

Extreme test data example .......................................................................................................


[3]

© UCLES 2021 0478/22/F/M/21


9

(c) The algorithm needs to be changed to include finding and outputting the smallest number input.
Describe how you would change the algorithm.

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

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

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

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

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

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

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

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

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

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

3 Four pseudocode statements and three flowchart symbols are shown.

Draw a line from each pseudocode statement to its correct flowchart symbol.

Pseudocode statement Flowchart symbol

IF X > 12

INPUT X

X Y + Z

OUTPUT X

[4]

© UCLES 2021 0478/22/F/M/21 [Turn over


10

4 This algorithm accepts weights of bags of cookies. Any cookie bag weighing between 0.9 and
1.1 kilograms inclusive is acceptable. Underweight bags weigh less than 0.9 kilograms and
overweight bags weigh more than 1.1 kilograms. An input of a negative number stops the process.
Then the total number of bags, the number of overweight bags and the number of underweight
bags weighed are output.

Accept← 0
Over ← 0
Under← 0
OUTPUT "Enter weight of first cookie bag"
INPUT BagWeight
WHILE BagWeight > 0
IF BagWeight > 1.1
THEN
Error ← 1
ELSE
IF BagWeight < 0.9
THEN
Error ← 2
ELSE
Error ← 0
ENDIF
ENDIF
CASE Error OF
0 : Accept ← Accept + 1
1 : Over ← Over + 1
2 : Under ← Under + 1
ENDCASE
OUTPUT "Weight of next bag?"
INPUT BagWeight
ENDWHILE
Total ← Accept – Over – Under
OUTPUT "Number of bags weighed ", Total
OUTPUT "Number overweight ", Over
OUTPUT "Number underweight ", Under

© UCLES 2021 0478/22/F/M/21


11

(a) Complete a trace table for the given algorithm using this input data:
1.05, 0.99, 1.2, 0.85, 1.1, 0.9, 1.5, 0.95, 1.05, 1.00, 1.07, 0.89, –10

BagWeight Accept Over Under Error Total OUTPUT

[7]

(b) There is an error in this algorithm.


Identify the error and write the corrected pseudocode statement.

Error ..........................................................................................................................................

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

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

© UCLES 2021 0478/22/F/M/21 [Turn over


12

5 A database table, CHOCBAR, is used to keep a record of chocolate bars sold. Chocolate bars are
categorised by:

• SIZE – small or large


• FILLING – brief description, for example mint crunch
• PRICE – price in Rupees, for example ₹2.50
• NUMBERSOLD – how many sold

A database management system uses these data types:

Text Number Currency Boolean

(a) Select the most appropriate data type for these three fields from the four data types shown.
Each data type must be different. State the reason why you chose the data type.

SIZE data type ..........................................................................................................................

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

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

PRICE data type .......................................................................................................................

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

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

NUMBERSOLD data type ........................................................................................................

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

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

(b) Complete the query-by-example grid below to display only the price, filling and number sold
of small chocolate bars that have sold fewer than 10 bars.

Field:

Table:

Sort:

Show:

Criteria:

or:

[3]

© UCLES 2021 0478/22/F/M/21


13

BLANK PAGE

© UCLES 2021 0478/22/F/M/21


14

BLANK PAGE

© UCLES 2021 0478/22/F/M/21


15

BLANK PAGE

© UCLES 2021 0478/22/F/M/21


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 the Cambridge Assessment Group. Cambridge Assessment is the brand name of the University of
Cambridge Local Examinations Syndicate (UCLES), which itself is a department of the University of Cambridge.

© UCLES 2021 0478/22/F/M/21


Cambridge IGCSE™

COMPUTER SCIENCE 0478/22


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

This document consists of 8 printed pages.

© UCLES 2021 [Turn over


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

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 2021 Page 2 of 8


0478/22 Cambridge IGCSE – Mark Scheme March 2021
PUBLISHED

Question Answer Marks

Section A

1(a) Variable answer (example only) 4


Data type integer/int
Validation two distinct different points OR one point and an expansion
One mark per mark point, max two
– restricted input to positive numbers
– checked if input was numeric
– ensured that input was a whole number / integer
– checked if a value was input
Or one point and an expansion two marks, for example
– restricted input to positive numbers (1) by using a range/limit check /
REPEAT… UNTIL looping until value greater than zero (1)
– checked if input was numeric (1) by using a type check (1)
– ensured the value input was a whole number (1) any suitable method e.g.
rounding to whole number
– checked if a value was input (1) by using a presence check (1)

1(b) Variable noAttempts (example only) 3


Data type integer/int
Use storing the number of attempts a pupil has made on a question

© UCLES 2021 Page 3 of 8


0478/22 Cambridge IGCSE – Mark Scheme March 2021
PUBLISHED

Question Answer Marks

1(c) One mark per mark point, max six 6


MP1 initialisation (must include number of correct answers)
MP2 input name and table number with prompts
MP3 validate table number and reinput
MP4 ensure each question uses a different multiplier
MP5 display question
MP6 input and validate answer
MP7 check if answer correct
MP8 update score appropriately
MP9 repeat for 5 questions
MP10 display score and name at end …
MP11 …with an attempt to display an appropriate message dependent on
score
Example
Score = 0
Multiplier[1] ← 2
Multiplier[2] ← 5
Multiplier[3] ← 7
Multiplier[4] ← 8
Multiplier[5] ← 11
OUTPUT "Multiplication Table Test"
OUTPUT "Please enter your name"
INPUT Name
REPEAT
OUTPUT "Please enter the table (2 to 12) you would like
to be tested"
INPUT Table
UNTIL (Table >=2) AND (Table <=12)
FOR Count = 1 TO 5
OUTPUT ("Question ", Count)
OUTPUT (Multiplier[Count], " X ", Table, " = ")
REPEAT
INPUT Answer
UNTIL Answer > 0 AND Answer = INT(Answer)
IF Answer = Multiplier[Count] * Table
THEN
Score ← Score + 1
ENDIF
NEXT
OUTPUT (Name, " your score is ", Score)
IF Score = 5
THEN
OUTPUT ("Well done full marks")
ELSE
OUTPUT ("Have another practice")
ENDIF

© UCLES 2021 Page 4 of 8


0478/22 Cambridge IGCSE – Mark Scheme March 2021
PUBLISHED

Question Answer Marks

1(d) Explanation 4
One mark per mark point illustrated with a suitable programming statement, max
four
MP1 extra prompt and input to choose the number of questions and/or
mixed set
MP2 method of choosing number of questions and/or mixed set
MP3 extra prompt and input for number of questions
MP4 explanation of validation for either input
MP5 how the end value for the question loop was changed if required
MP6 how the program was changed to allow for mixed tables
MP7 … how the program ensured that the test used more than one
multiplication table

1(e) Explanation 3
One mark per mark point, max three
MP1 how to provide 3 answers, including the correct one
MP2 how to ensure that all 3 answers are different
MP3 how 3 answers are displayed e.g. output all 3 answers as a numbered
list
MP4 how to select the correct answer e.g. input the number of the correct
answer
MP5 how to ensure that the correct answer is not always in the same
position

© UCLES 2021 Page 5 of 8


0478/22 Cambridge IGCSE – Mark Scheme March 2021
PUBLISHED

Question Answer Marks

Section B

2(a) – 12 4
– 13
– 07
– 15

2(b) – 27 (example many correct answers any whole number 1-99 inclusive) 3
– 106 (example many correct answers)
– 99/1

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


– new variable for minimum…
– … set to first value/high value
– … at start of program / before line 4
– test input / D for less than minimum
– … replace value minimum if input less than
– … after line 7 and before line 14
– new output for minimum (with appropriate message)
– … at end of program // after line 14

Question Answer Marks

3 Pseudocode statement Flowchart symbol 4

IF X > 12

INPUT X

X ← Y + Z

OUTPUT X

One mark for a single line to decision box from IF X > 12


One mark for a single line to process box from X ← Y + Z

Two marks for two single lines from INPUT X and OUTPUT X to output box
OR
One mark for a single line from INPUT X or OUTPUT X to output box // two
single lines from INPUT X and OUTPUT X to process box

© UCLES 2021 Page 6 of 8


0478/22 Cambridge IGCSE – Mark Scheme March 2021
PUBLISHED

Question Answer Marks

4(a) One mark for each correct column 7


Bag
Accept Over Under Error Total OUTPUT
Weight
0 0 0 (Enter weight of
first cookie
bag)
1.05 1 0 (Weight of next
bag?)
0.99 2 0 (Weight of next
bag?)
1.2 1 1 (Weight of next
bag?)
0.85 1 2 (Weight of next
bag?)
1.1 3 0 (Weight of next
bag?)
0.9 4 0 (Weight of next
bag?)
1.5 2 1 (Weight of next
bag?)
0.95 5 0 (Weight of next
bag?)
1.05 6 0 (Weight of next
bag?)
1.00 7 0 (Weight of next
bag?)
1.07 8 0 (Weight of next
bag?)
0.89 2 2 (Weight of next
bag?)
-10 4
Number of bags
weighed 4
Number
overweight 2
Number
underweight 2

4(b) Error Total ← Accept – Over – Under // line 26 2


Correction Total ← Accept + Over + Under

© UCLES 2021 Page 7 of 8


0478/22 Cambridge IGCSE – Mark Scheme March 2021
PUBLISHED

Question Answer Marks

5(a) One mark for data type and reason 3


SIZE text, expressed as a single word // Boolean, only two choices
PRICE currency, needs to be expressed as Rupees/money
NUMBERSOLD number, integer values/could be used in calculations

5(b) 3
Field: SIZE FILLING PRICE NUMBERSOLD

Table: CHOCBAR CHOCBAR CHOCBAR CHOCBAR

Sort:

Show:    

Criteria: = "small" <10

or:

One mark for correct rows Field, Table and Sort


One mark for correct Show row
One mark for correct Criteria row

© UCLES 2021 Page 8 of 8


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

COMPUTER SCIENCE 0478/12


Paper 1 Theory May/June 2021

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 (DH/SG) 202677/4
© UCLES 2021 [Turn over
2

1 A denary value can be converted into hexadecimal and binary.

(a) Complete the table to show the hexadecimal and 8-bit binary values of the given denary
values.

Denary Hexadecimal 8-bit binary

49

123

200

[6]

Working space

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

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

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

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

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

(b) Give two benefits, to users, of converting binary values to hexadecimal.

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

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

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

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

(c) Hexadecimal is used to represent Hypertext Markup Language (HTML) colour codes in
computer science.

Identify three other ways that hexadecimal is used in computer science.

1 ................................................................................................................................................

2 ................................................................................................................................................

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

© UCLES 2021 0478/12/M/J/21


3

2 Data storage can be magnetic, solid state or optical.

(a) Six statements are given about data storage.

Tick (3) to show if the statement applies to magnetic, solid state or optical storage. Some
statements may apply to more than one type of storage.

Magnetic Solid state Optical


Statement
(3) (3) (3)
no moving parts are used to store data

pits and lands are used to store data

data is stored on platters

flash memory is used to store data

parts are rotated to store data

data can be stored permanently


[6]

(b) (i) Give one example of magnetic storage.

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

(ii) Give one example of optical storage.

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

(iii) Identify which type of storage would be the most suitable for use in a web server and
justify your choice.

Type of storage ..................................................................................................................

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

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

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

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

(c) Describe the operation of USB flash memory and how it stores data.

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

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

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

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

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

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

© UCLES 2021 0478/12/M/J/21 [Turn over


4

3 Consider the logic statement:

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

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

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

B X

[6]

© UCLES 2021 0478/12/M/J/21


5

(b) Consider the completed truth table for the given logic statement.

Row Working space


A B C X
number
1 0 0 0 1

2 0 0 1 1

3 0 1 0 1

4 0 1 1 0

5 1 0 0 1

6 1 0 1 0

7 1 1 0 1

8 1 1 1 1

There are four errors in the truth table in the output (X) column.

Identify the four incorrect outputs.

Write the row number to identify each incorrect output.

Row .......................

Row .......................

Row .......................

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

© UCLES 2021 0478/12/M/J/21 [Turn over


6

4 Three types of Internet security risk are virus, spyware and denial of service (DoS) attack.

(a) Six statements are given about Internet security risks.

Tick (3) to show whether the statement applies to virus, spyware or denial of service. Some
statements may apply to more than one Internet security risk.

Denial of
Statement Virus Spyware service
(3) (3) (3)
captures all data entered using a keyboard

can be installed onto a web server

prevents access to a website

is malicious code on a computer

is self-replicating

damages the files on a user’s hard drive


[6]

(b) Identify three other types of Internet security risks.

1 ................................................................................................................................................

2 ................................................................................................................................................

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

(c) Some Internet security risks can maliciously damage data. Data can also be damaged
accidentally.

State three ways that data could be accidentally damaged.

1 ................................................................................................................................................

2 ................................................................................................................................................

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

© UCLES 2021 0478/12/M/J/21


7

5 A security light system is used by a factory. The light only comes on when it is dark and when
movement is detected. The light will stay on for 1 minute before switching off.

Sensors and a microprocessor are used to control the security light system.

(a) Identify two sensors that would be used in the security light system.

Sensor 1 ...................................................................................................................................

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

(b) Describe how the sensors and the microprocessor control the security light system.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

............................................................................................................................................. [8]

© UCLES 2021 0478/12/M/J/21 [Turn over


8

6 Cookies can be used to store a user’s personal data and online browsing habits.

(a) A cookie could be used to automatically enter a user’s payment details when the user makes
a purchase online.

Describe how cookies can be used to store and automatically enter a user’s payment details.

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

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

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

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

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

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

(b) Explain why a user may be concerned about their personal data and online browsing habits
being stored in cookies.

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

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

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

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

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

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

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

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

© UCLES 2021 0478/12/M/J/21


9

7 Jolene uses HTML to create a website. She separates the HTML into structure and presentation.

(a) (i) Give one example of HTML structure.

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

(ii) Give two examples of HTML presentation.

1 ........................................................................................................................................

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

(b) Explain why Jolene separates the HTML into structure and presentation.

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

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

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

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

8 A keyboard is a type of input device that can be used to enter data into a computer.

Complete the paragraph that describes one method of operation for a keyboard, using the most
appropriate terms from the given list. Not all terms in the list need to be used.

• Binary
• Breaks
• Calculated
• Character
• Circuit
• Current
• Information
• Network
• Press
• Processor
• Signal
• Switch

A keyboard has a key matrix underneath the keys. When a key is pressed, it presses a

............................................. that completes a ............................................. . This allows

............................................. to flow. The location of the key pressed is

............................................. . The location of the key pressed is compared to a

............................................. map to find the ............................................. value for the key that

has been pressed.


[6]

© UCLES 2021 0478/12/M/J/21


10

BLANK PAGE

© UCLES 2021 0478/12/M/J/21


11

BLANK PAGE

© UCLES 2021 0478/12/M/J/21


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 the Cambridge Assessment Group. Cambridge Assessment is the brand name of the University of
Cambridge Local Examinations Syndicate (UCLES), which itself is a department of the University of Cambridge.

© UCLES 2021 0478/12/M/J/21


Cambridge IGCSE™

COMPUTER SCIENCE 0478/12


Paper 1 May/June 2021
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 2021 series for most Cambridge
IGCSE™, Cambridge International A and AS Level components and some Cambridge O Level components.

This document consists of 8 printed pages.

© UCLES 2021 [Turn over


0478/12 Cambridge IGCSE – Mark Scheme May/June 2021
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.

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 2021 Page 2 of 8


0478/12 Cambridge IGCSE – Mark Scheme May/June 2021
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 MP has ellipsis at the beginning,
but there is no ellipsis on the MP before it, then this is just a follow-on sentence and can be
awarded without the previous mark point.

© UCLES 2021 Page 3 of 8


0478/12 Cambridge IGCSE – Mark Scheme May/June 2021
PUBLISHED

Question Answer Marks

1(a) One mark per each correct binary value. 6


One mark per each correct hex value.

Denary Hexadecimal 8-bit binary

49 31 00110001

123 7B 01111011

200 C8 11001000

1(b) Any two from: 2


− Easier/quicker to read/write/understand
− Easier/quicker to identify errors/debug
− Takes up less screen/display space
− Less chance of making an error

1(c) Any three from: 3


− MAC address
− URL
− Assembly language
− Error codes // error messages
− IP addresses
− Locations in memory
− Memory dumps

Question Answer Marks

2(a) One mark per each correct row. 6

Magnetic Solid Optical


Statement () state ()
()

no moving parts are used to store data 

pits and lands are used to store data 

data is stored on platters 

flash memory is used to store data 

parts are rotated to store data  

data can be stored permanently   

2(b)(i) Any one from: 1


− Hard disk drive // HDD
− Magnetic tape

© UCLES 2021 Page 4 of 8


0478/12 Cambridge IGCSE – Mark Scheme May/June 2021
PUBLISHED

Question Answer Marks

2(b)(ii) Any one from: 1


− CD
− DVD
− Blu-ray disk

2(b)(iii) One for type of storage, two for matching justification from: 3
− Magnetic // HDD
− (Web server) is likely to receive many requests a day
− (Web server) will likely need to store a lot of data and magnetic is high
capacity
− Magnetic is cheaper to buy for storage per unit than solid state
− Magnetic is capable of more of read/write requests over time // has more
longevity // SSD has more limited number of read/write requests (before
it is no longer usable)
− No requirement for it to be portable, so moving parts does not matter

− Solid-state // SSD
− (Web server) is likely to receive many requests a day
− (Web server) will likely need to store a lot of data and solid-state is high
capacity
− Solid-state is more energy efficient
− Solid-state runs cooler so will not overheat
− Solid state has faster read/write speeds to handle volume of traffic

2(c) Any three from: 3


− Data is flashed onto (silicon) chips
− Uses NAND/NOR technology // can use flip-flops
− Uses transistors/control gates/floating gates …
− … to control the flow of electrons
− It is a type of EEPROM technology
− When data is stored the transistor is converted from 1 to 0 / 0 to 1
− Writes (and reads) sequentially

3(a) One mark for each correct logic gate with correct input. 6

© UCLES 2021 Page 5 of 8


0478/12 Cambridge IGCSE – Mark Scheme May/June 2021
PUBLISHED

Question Answer Marks

3(b) One mark per each correct row. 4


− Row 2
− Row 3
− Row 7
− Row 8

Question Answer Marks

4(a) One mark per each correct row. 6

Virus Spyware Denial of


Statement () () service
()

captures all data entered using a keyboard 

can be installed onto a web server  

prevents access to a website 

is malicious code on a computer  

is self-replicating 

damages the files on a user’s hard drive 

4(b) Any three from: 3


− Phishing
− Pharming
− Hacking // cracking

4(c) Any three from: 3


− Human error
− Power failure/surge
− Hardware failure
− Software failure
− Fire
− Flood

5(a) − Light sensor 2


− Motion sensor // infra-red sensor

© UCLES 2021 Page 6 of 8


0478/12 Cambridge IGCSE – Mark Scheme May/June 2021
PUBLISHED

Question Answer Marks

5(b) Eight from: 8


− Sensors send data to microprocessor
− Data is converted to digital (using ADC)
− Microprocessor compares data to stored value(s) …
− … if one value or neither values are within range/out of range/match no
action is taken
− … If both values are out of range/in range/match microprocessor sends
signal to switch light on …
− … 1-minute timer is started
− Actuator used to switch on/off light
− When timer reaches 1 minute, microprocessor sends signal to switch
light off
− Whole process is continuous

6(a) Any three from: 3


− Webserver sends (cookie) file to user’s browser
− User’s payment details stored in encrypted text file // data is encrypted to
be stored
− Cookie file is stored by browser/on user’s HDD/SSD
− When user revisits website, webserver requests cookie file // webserver
can access the data stored in the cookie file (to automatically enter
details)
− … and browser sends cookie file back to webserver (to automatically
enter the details)

6(b) Four from: 4


− User does not see what information is stored // might collect data that
user does not know about …
− … so, user may feel their privacy is affected

− A profile could be built about the user …


− … that could expose a user’s identity // lead to identity theft

− Sensitive information stored in cookies could be intercepted in


transmission …
− Other websites could gain access to the cookies stored on a user’s
computer …
− Computer could be hacked to obtain data stored in cookies …
− … so, payment information could be stolen and used by a third party

Question Answer Marks

7(a)(i) Any one from: 1


− Placement of text/image
− Margins
− Line break
− Padding

NOTE: Any relevant example of structure can be awarded

© UCLES 2021 Page 7 of 8


0478/12 Cambridge IGCSE – Mark Scheme May/June 2021
PUBLISHED

Question Answer Marks

7(a)(ii) Any two from: 2


− Font colour
− Font style
− Font size
− Background colour
− Image size
− Border properties

NOTE: Any relevant example of presentation can be awarded

7(b) Any two from: 2


− Can easily change/edit the style of the webpage
− So, CSS can be used to create a template/style sheet
− Can add new content and apply the same style easily
− Can re-use the presentation/style for other websites

8 One mark for each correct term in the correct order 6


− Switch
− Circuit
− Current
− Calculated
− Character
− Binary

© UCLES 2021 Page 8 of 8


Cambridge IGCSE™
* 0 3 3 7 1 8 6 9 5 9 *

COMPUTER SCIENCE 0478/22


Paper 2 Problem-solving and Programming May/June 2021

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 (LK) 202758/1
© UCLES 2021 [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 tasks before the examination to
answer Question 1.

Pre-release material

An electric mountain railway makes four return trips every day. In each trip the train goes up the
mountain and back down. The train leaves from the foot of the mountain at 09:00, 11:00, 13:00 and
15:00. The train returns from the top of the mountain at 10:00, 12:00, 14:00 and 16:00. Each train
has six coaches with eighty seats available in each coach. Passengers can only purchase a return
ticket; all tickets must be purchased on the day of travel. The cost is $25 for the journey up and
$25 for the journey down. Groups of between ten and eighty passengers inclusive get a free ticket
for every tenth passenger, provided they all travel together (every tenth passenger travels free).
Passengers must book their return train journey, as well as the departure train journey, when they
purchase their ticket. Passengers can return on the next train down the mountain or a later train.
The last train from the top of the mountain has two extra coaches on it.

The train times are displayed on a large screen, together with the number of tickets still available
for each train. Every time a ticket is booked the display is updated. When a train is full, the word
‘Closed’ is displayed instead of the number of tickets available.

Write and test a program or programs for the electric mountain railway.

• Your program or programs must include appropriate prompts for the entry of data; data must
be validated on entry.
• Error messages and other output 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 – Start of the day.


Write a program to set up the screen display for the start of the day. Initialise suitable data structure(s)
to total passengers for each train journey and total the money taken for each train journey. Each
train journey must be totalled separately. There are four journeys up and four journeys down every
day.

Task 2 – Purchasing tickets.


Tickets can be purchased for a single passenger or a group. When making a purchase, check
that the number of tickets for the required train journeys up and down the mountain is available. If
the tickets are available, calculate the total price including any group discount. Update the screen
display and the data for the totals.

Task 3 – End of the day.


Display the number of passengers that travelled on each train journey and the total money taken
for each train journey. Calculate and display the total number of passengers and the total amount
of money taken for the day. Find and display the train journey with the most passengers that day.

© UCLES 2021 0478/22/M/J/21


3

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

(a) Identify and give the data type and use of one array that you could have used for Task 1.

Array .........................................................................................................................................

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

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

(b) Describe two validation checks that could be used when inputting the number of tickets to
buy for Task 2. For each validation check give one example of normal data and one example
of erroneous data.

Validation check 1 .....................................................................................................................

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

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

Normal data ..............................................................................................................................

Erroneous data .........................................................................................................................

Validation check 2 .....................................................................................................................

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

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

Normal data ..............................................................................................................................

Erroneous data .........................................................................................................................


[6]

© UCLES 2021 0478/22/M/J/21 [Turn over


4

(c) Write an algorithm for the part of Task 2 that inputs the tickets required, calculates the total
price for the ticket(s) purchased by a passenger including a group discount (if applicable) and
updates the data structures used for the totals.
Use either pseudocode, programming statements or a flowchart.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

...................................................................................................................................................
© UCLES 2021 0478/22/M/J/21
5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

© UCLES 2021 0478/22/M/J/21 [Turn over


6

(d) Explain how your program completed Task 3. Include any programming statements that you
have used and fully explain the purpose of each statement.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

© UCLES 2021 0478/22/M/J/21


7

Section B starts on page 8

© UCLES 2021 0478/22/M/J/21 [Turn over


8

Section B

2 (a) Write an algorithm in pseudocode to input 500 positive whole numbers. Each number input
must be less than 1000. Find and output the largest number input, the smallest number input
and the range (difference between the largest number and smallest number).

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

© UCLES 2021 0478/22/M/J/21


9

(b) Describe how the algorithm could be changed to make testing less time-consuming.

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

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

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

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

3 (a) Draw the most appropriate flowchart symbol for each pseudocode statement.

Pseudocode statement Flowchart symbol

IF Number = 20

PRINT Number

Number ← Number + 1

[3]

(b) State the type of each pseudocode statement. For example, X ← X + Y is totalling.
IF Number = 20 ...................................................................................................................

PRINT Number ........................................................................................................................

Number ← Number + 1 ......................................................................................................


[3]

© UCLES 2021 0478/22/M/J/21 [Turn over


10

4 This algorithm checks passwords.

• Each password must be 8 or more characters in length; the predefined function Length
returns the number of characters.
• Each password is entered twice, and the two entries must match.
• Either Accept or Reject is output.
• An input of 999 stops the process.

REPEAT
OUTPUT "Please enter password"
INPUT Password
IF Length(Password) >= 8
THEN
INPUT PasswordRepeat
IF Password <> PasswordRepeat
THEN
OUTPUT "Reject"
ELSE
OUTPUT "Accept"
ENDIF
ELSE
OUTPUT "Reject"
ENDIF
UNTIL Password = 999

(a) Complete the trace table for the algorithm using this input data:
Secret, Secret, VerySecret, VerySecret, Pa55word, Pa55word, 999, 888

Password PasswordRepeat OUTPUT

[3]

© UCLES 2021 0478/22/M/J/21


11

(b) Explain how the algorithm could be extended to allow three attempts at inputting the matching
password. Any pseudocode statements used in your answer must be fully explained.

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

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

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

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

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

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

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

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

5 A one-dimensional array dataArray[1:20] needs each element set to zero.

(a) Write a pseudocode routine that sets each element to zero. Use the most suitable loop
structure.

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

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

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

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

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

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

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

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

(b) Explain why you chose this loop structure.

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

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

© UCLES 2021 0478/22/M/J/21 [Turn over


12

6 A database table, PLANT, is used to keep a record of plants sold by a nursery. The table has these
fields:
• NAME – name of plant
• FLOWER – whether the plant flowers (True) or not (False)
• POSITION – shade, partial shade or sun
• SIZE – small, medium or large
• PRICE – price in $
• NUMBERSOLD – how many sold

A query-by-example grid has been completed to display only the price, name and number sold of
small plants that do not flower.

Field: NAME PRICE NUMBERSOLD SIZE FLOWER POSITION

Table: PLANT

Sort:

Show: 3 3 3

Criteria: = "shade"

or:

Identify the errors in the query-by-example grid.

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

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

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

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

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

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

Rewrite the corrected query-by-example grid.

Field:

Table:

Sort:

Show:

Criteria:

or:

[5]

© UCLES 2021 0478/22/M/J/21


13

BLANK PAGE

© UCLES 2021 0478/22/M/J/21


14

BLANK PAGE

© UCLES 2021 0478/22/M/J/21


15

BLANK PAGE

© UCLES 2021 0478/22/M/J/21


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 the Cambridge Assessment Group. Cambridge Assessment is the brand name of the University of
Cambridge Local Examinations Syndicate (UCLES), which itself is a department of the University of Cambridge.

© UCLES 2021 0478/22/M/J/21


Cambridge IGCSE™

COMPUTER SCIENCE 0478/22


Paper 2 May/June 2021
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 2021 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 2021 [Turn over


0478/22 Cambridge IGCSE – Mark Scheme May/June 2021
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 2021 Page 2 of 13


0478/22 Cambridge IGCSE – Mark Scheme May/June 2021
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 2021 Page 3 of 13


0478/22 Cambridge IGCSE – Mark Scheme May/June 2021
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 MP has ellipsis at the beginning, but there is no ellipsis on the MP before it, then this is just a follow-on sentence and can
be awarded without the previous mark point.

© UCLES 2021 Page 4 of 13


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

Section A

1(a) Array TrainUpPassengers // TrainUpPassengers[] 3


Data type Integer/int
Use storing the number of passengers on the train journeys up

Many correct answers, this is an example.

1(b) One mark for description, one mark for normal data and one mark for erroneous data for two checks 6

Validation check (type check) to check that the number entered is a whole number / integer
Normal data 34
Erroneous data two // 1.5

Validation check (range check) to check that the value of the number entered is between 1 and 80 / 480 inclusive
Normal data 34
Erroneous data 99 // 500

Validation check (presence check) to check that a value has been entered
Normal data 34 // any data entered
Erroneous data “” // blank // no data entered

Validation check (length check) to check that a value has 3 digits or fewer // between 1 and 3 digits
Normal data 345
Erroneous data 3456

Many correct answers, the data are examples only.

© UCLES 2021 Page 5 of 13


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

1(c) Any six from: 6


MP1 Input number of tickets
MP2 Input train up mountain and train down mountain
MP3 Suitable prompts seen for inputs that are included
MP4 Check that tickets are available on selected train(s)
MP5 If available calculate price of tickets …
MP6 … calculation includes discount if required
MP7 Update total passengers / seats available for a train
MP8 Update total passengers / seats available for up train and down train
MP9 Update total cost for a train
MP10 Update total cost for up train and down train

Example answers
OUTPUT "How many tickets"
INPUT NoTickets
OUTPUT "Which Train up the mountain? 1, 2, 3 or 4"
INPUT UpNumber
OUTPUT "Which Train down the mountain? 1, 2, 3 or 4"
INPUT DownNumber
IF (DownNumber = 4 AND TrainUp[UpNumber] + NoTickets <= 480 AND TrainDown[DownNumber] +
NoTickets <= 640) OR (TrainUp[UpNumber] + NoTickets <= 480 AND TrainDown[DownNumber] +
NoTickets <= 480)
THEN
Cost ← (NoTickets – NoTickets DIV 10) * 50
TrainUp[UpNumber] ← TrainUp[UpNumber] + NoTickets
TrainDown[DownNumber] ← TrainUp[DownNumber] + NoTickets
TrainUpTotal[UpNumber] ← TrainUpTotal[UpNumber] + Cost / 2
TrainDownTotal[DownNumber] ← TrainDownTotal[DownNumber] + Cost / 2
ENDIF

© UCLES 2021 Page 6 of 13


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

1(c)
START

OUTPUT "Tickets"
INPUT Tickets

OUTPUT "Up Train"


INPUT UpNo

OUTPUT "Down Train"


Yes
INPUT DownNo

Is Tickets <= No
UpTickets[UpNo] AND
Tickets <=
DownTickets[DownNo]?

Yes

Cost ← (NoTickets – NoTickets DIV 10) * 50

TrainUp[UpNo] ← TrainUp[UpNo] + NoTickets


TrainDown[DownNo] ← TrainUp[DownNo] + NoTickets
TrainUpTotal[UpNo] ← TrainUpTotal[UpNo] + Cost / 2
TrainDownTotal[DownNo] ← TrainDownTotal[DownNo] + Cost / 2

END

© UCLES 2021 Page 7 of 13


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

1(d) Explanation 5
Any five from:
MP1 How the program displayed the number of passengers for a journey ...
MP2 … how completed for all trains
MP3 How the program displayed the amount of money taken for a journey …
MP4 … how completed for all trains
MP5 How the program calculated the total number of passengers
MP6 How the program calculated the total money taken
MP7 How the program attempted to select the train journey with the most passengers
MP8 How the program attempted to dealt with more than one train being the most popular
MP9 How the program displayed the results with suitable messages

Programming statements must be given with each explanation.

© UCLES 2021 Page 8 of 13


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

Section B

2(a) Any six from: 6


MP1 Initialisation of large and small variables e.g. Large ← 0 Small ← 1000
MP2 Use of a loop for 500 entries // or 499 if initialisation done on first correct entry
MP3 Input with prompt
MP4 Attempt at checking the range of 1 to 999 for input
MP5 … working range check
MP6 Checking for a whole number
MP7 Selecting largest number
MP8 Selecting smallest number
MP9 Calculating the range
MP10 Outputting the largest, smallest and range with message
Large ← 0
Small ← 1000
FOR Count ← 1 TO 500
REPEAT
OUTPUT "Enter a whole number between 1 and 999"
INPUT Number
UNTIL Number >= 1 AND Number < 1000 AND Number = Number DIV 1
IF Number < Small
THEN
Small ← Number
ENDIF
IF Number > Large
THEN
Large ← Number
ENDIF
NEXT
Range ← Large – Small
OUTPUT "Largest number is ", Large, " Smallest number is ", Small, " Range of numbers is
", Range

© UCLES 2021 Page 9 of 13


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

2(b) One mark for action required and one mark for method used 2

Reduce the amount of numbers entered


By decreasing the final value of the loop
or
Remove the need to input values
By using random numbers / a previously populated array

3(a) 3
Pseudocode statement Flowchart symbol

IF Number = 20

PRINT Number

Number ← Number + 1

3(b) IF Number = 20 selection 3


PRINT Number output
Number ← Number + 1 counting

© UCLES 2021 Page 10 of 13


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

4(a) One mark for each correct column 3

Password PasswordRepeat OUTPUT

(Please enter password)

Secret Reject

(Please enter password)

Secret Reject

(Please enter password)

VerySecret VerySecret Accept

(Please enter password)

Pa55word Pa55word Accept

(Please enter password)

999 Reject

© UCLES 2021 Page 11 of 13


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

4(b) Any four from: 4


• Position: before INPUT PasswordRepeat // at start
• …use a (variable) counter (for number of tries) or flag
• … initialise variable counter or flag

• Position after IF Length(Password) >= 8 THEN or after INPUT PasswordRepeat


• … insert REPEAT/WHILE/(conditional) loop

• Position after OUTPUT "Reject"


• … add one to counter (for number of tries)
• … output a message "Try again"
• … add INPUT PasswordRepeat

• Position after OUTPUT "Accept"


• … reset flag to show password matched

• Position after ENDIF


• … (insert UNTIL/ENDWHILE)to exit the loop after three tries or if the repeated password matches the original

Question Answer Marks

5(a) One mark for: 3


• Use of FOR loop
• Working loop with correct number of Iterations
• Correct assignment
FOR Count ← 1 TO 20
dataArray[Count] ← 0
NEXT (Count)

5(b) (A FOR loop has) a fixed number of repetitions // 1


No need to manage the loop counter //
no need to use another variable for the array index

© UCLES 2021 Page 12 of 13


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

6 Any three from: 5


• TABLE row not completed
• POSITION column not required // POSITION criteria not required
• No criteria set in the size column
• No criteria set in the flower column

Field: SIZE PRICE FLOWER NUMBERSOLD NAME

Table: PLANT PLANT PLANT PLANT PLANT

Sort:

Show:     

Criteria: ="small" False

or:

OR

Field: SIZE PRICE FLOWER NUMBERSOLD NAME POSITION

Table: PLANT PLANT PLANT PLANT PLANT PLANT

Sort:

Show:      

Criteria: ="small" = False

or:

One mark for correct rows Field, Table and Show


One mark for correct Criteria row

© UCLES 2021 Page 13 of 13


Cambridge IGCSE™
* 9 3 8 8 8 6 9 5 2 8 *

COMPUTER SCIENCE 0478/12


Paper 1 Theory October/November 2021

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 (KS/FC) 202713/4
© UCLES 2021 [Turn over
2

1 (a) Denary is a number system that is used by programmers.

Tick (✓) one box to show whether denary is a base-2, base-10 or base-16 number system.

Tick
(✓)

Base-2

Base-10

Base-16
[1]

(b) Hexadecimal values can be used to represent denary values.

Convert these four hexadecimal values into denary values.

05 ......................................................

20 ......................................................

1A ......................................................

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

Working space

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

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

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

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

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

© UCLES 2021 0478/12/O/N/21


3

(c) Hexadecimal values can also be converted to binary values.

Tick (✓) one box to show the correct 8-bit binary value for each hexadecimal value.

(i) Hexadecimal value 25

Tick
(✓)

00011001

00100101

10100001
[1]

(ii) Hexadecimal value 1B

Tick
(✓)

00011011

10110001

00011010
[1]

(d) (i) Give one way that hexadecimal is used in website development.

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

(ii) Give one way that hexadecimal is used in low-level programming.

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

2 A train company wants to install a self-service ticket machine system for its train stations. When
the customer has purchased their tickets, the machine will provide a paper ticket.

(a) One output device that is used in the ticket machine is a display screen.

Identify one other output device that is used in the ticket machine system.

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

(b) The train company does not want users to use a keyboard or a mouse to enter their data,
when buying a ticket. The company is worried that they may be stolen or get too dirty.

Identify one other input device that would be suitable for use in the ticket machine system, to
allow users to enter their data.

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

© UCLES 2021 0478/12/O/N/21 [Turn over


4

3 (a) Six statements are given about methods of data transmission.

Tick (✓) to show if each statement applies to serial simplex, parallel simplex, parallel
half-duplex or serial duplex data transmission. Some statements may apply to more than one
data transmission method.

Serial Parallel Parallel Serial


Statement simplex simplex half-duplex duplex
(✓) (✓) (✓) (✓)

bits are transmitted along a single wire

data is transmitted in both directions

it is only suitable for distances less


than 5 metres
bits from the same byte are
transmitted one after the other
data may not arrive in the correct
sequence
data is transmitted in both directions,
but only one direction at a time
[6]

(b) A Universal Serial Bus (USB) connection can be used to transmit data from a mobile device
to a computer.

Give three benefits of using a USB connection for this purpose.

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

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

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

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

Benefit 3 ...................................................................................................................................

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

© UCLES 2021 0478/12/O/N/21


5

4 The paragraph explains the operation of different touch screen technologies.

Complete the paragraph using the list of terms. Not all terms in the list need to be used.

• capacitive
• change
• circuit
• conductive
• coordinates
• grid
• heat
• infra-red
• insulating
• light
• manufacture
• pressure
• resistive

In ............................................................................ touch screen technology, an electrostatic field

is present on the surface of the touch screen. The ............................................................................

properties of a user cause a ............................................................................ in the field. The

............................................................................ of the user’s touch can be calculated.

In ............................................................................ touch screen technology, a user pushes the

top layer of the screen and makes it connect with the bottom layer to complete a

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

This type of touch screen is cheaper to ............................................................................ .


[7]

© UCLES 2021 0478/12/O/N/21 [Turn over


6

5 Sammi works for a finance company and has a laptop that he uses for his work. He has confidential
data about his customers stored on his laptop.

Sammi does not connect the laptop to any networks.

(a) Sammi is concerned about his customers’ confidential data being viewed by other people in
his office.

One method he uses to prevent others viewing the data is encryption.

Identify three other methods Sammi could use to prevent his customers’ confidential data
being viewed.

1 ................................................................................................................................................

2 ................................................................................................................................................

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

(b) Sammi creates videos for the finance company website that give customers advice about
their finances.

He uses lossy compression to reduce the file size of the videos for the website.

(i) Give three ways that lossy compression can reduce the file size of the videos.

1 ........................................................................................................................................

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

2 ........................................................................................................................................

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

3 ........................................................................................................................................

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

(ii) Give one drawback of using lossy compression to reduce the file size of the videos.

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

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

© UCLES 2021 0478/12/O/N/21


7

(c) Sammi could have used lossless compression to compress the videos for the website.

(i) Give one reason why he would use lossless compression, rather than lossy compression,
for the videos.

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

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

(ii) Give two disadvantages of Sammi using lossless compression, rather than lossy
compression, for the videos.

Disadvantage 1 .................................................................................................................

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

Disadvantage 2 .................................................................................................................

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

6 A programmer can use translators, such as an interpreter and a compiler, when developing a
computer program.

(a) Give one similarity between a compiler and an interpreter.

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

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

(b) Describe two differences between a compiler and an interpreter.

Difference 1 ..............................................................................................................................

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

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

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

Difference 2 ..............................................................................................................................

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

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

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

(c) Identify one other type of translator.

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

© UCLES 2021 0478/12/O/N/21 [Turn over


8

7 Five statements are given about devices.

Tick (✓) to show if each statement applies to a 3D scanner, barcode reader or a Quick Response
(QR) code reader. Some statements may apply to more than one type of device.

3D Barcode QR code
Statement scanner reader reader
(✓) (✓) (✓)
uses position and alignment markers for orientation
when scanning

scans the shape and appearance of an object

uses reflected light from a laser to convert


a black-and-white pattern into binary
can often be built into an Electronic Point Of Sale
(EPOS) terminal, for example, a supermarket checkout

it is an example of an input device


[5]

8 An electronic game has three square mats that are coloured red, green and blue.

The player will see a colour displayed on a screen and has 1 second to hit the mat that matches
the colour. If the player hits the correct mat, within 1 second, a counter is incremented. When a
player hits an incorrect mat, the game ends.

The game uses sensors and a microprocessor to determine if the player hits the correct mat within
1 second.

Explain how the game uses sensors and a microprocessor to count the number of times a player
hits a correct mat within 1 second.

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

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

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

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

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

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

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

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

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

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

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

© UCLES 2021 0478/12/O/N/21


9

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

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

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

9 Padma opens an application on her computer.

An interrupt is generated to inform the Central Processing Unit (CPU) that the application has
been opened.

(a) Give three other examples of when an interrupt signal could be generated.

1 ................................................................................................................................................

2 ................................................................................................................................................

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

(b) State what would happen if interrupt signals were not used in a computer.

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

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

10 Jermain uses the Secure Socket Layer (SSL) protocol for secure transmission when sending data
using the internet.

(a) Explain how the SSL protocol secures the data for transmission.

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

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

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

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

(b) Identify an alternative protocol that could be used for secure transmission of data using the
internet.

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

(c) Give two ways that a user can identify if a website uses secure data transmission.

1 ................................................................................................................................................

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

2 ................................................................................................................................................

...................................................................................................................................................
[2]
© UCLES 2021 0478/12/O/N/21 [Turn over
10

11 Consider the following logic statement:

X = (((A AND B) OR (NOT (B OR C))) NAND 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 2021 0478/12/O/N/21


11

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

A B C Working space 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]

(c) Identify two logic gates that are not included in the given logic statement.

Logic gate 1 ...............................................................................................................................

Logic gate 2 ..............................................................................................................................


[2]

© UCLES 2021 0478/12/O/N/21


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 the Cambridge Assessment Group. Cambridge Assessment is the brand name of the University of
Cambridge Local Examinations Syndicate (UCLES), which itself is a department of the University of Cambridge.

© UCLES 2021 0478/12/O/N/21


Cambridge IGCSE™

COMPUTER SCIENCE 0478/12


Paper 1 October/November 2021
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 2021 series for most
Cambridge IGCSE™, Cambridge International A and AS Level components and some Cambridge O Level
components.

This document consists of 12 printed pages.

© UCLES 2021 [Turn over


0478/12 Cambridge IGCSE – Mark Scheme October/November 2021
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 2021 Page 2 of 12


0478/12 Cambridge IGCSE – Mark Scheme October/November 2021
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 2021 Page 3 of 12


0478/12 Cambridge IGCSE – Mark Scheme October/November 2021
PUBLISHED
Question Answer Marks

1(a) − Base-10 1

1(b) − 5 4
− 32
− 26
− 171

1(c)(i) − 00100101 1

1(c)(ii) − 00011011 1

1(d)(i) Any one from: 1


− To represent HTML colour codes
− In error messages

1(d)(ii) Any one from: 1


− Assembly code/language
− Memory address locations
− In error messages
− Memory dump

© UCLES 2021 Page 4 of 12


0478/12 Cambridge IGCSE – Mark Scheme October/November 2021
PUBLISHED
Question Answer Marks

2(a) Any one from: 1


− Printer
− Speaker
− Light/LED
− Actuator

2(b) Any one from: 1


− Touchscreen
− Trackpad / touchpad
− Microphone
− QR code reader
− Barcode reader
− Magnetic strip reader
− RFID reader

© UCLES 2021 Page 5 of 12


0478/12 Cambridge IGCSE – Mark Scheme October/November 2021
PUBLISHED
Question Answer Marks

3(a) One mark per each correct row. 6

Parallel Parallel Serial


Serial
Statement simplex half-duplex duplex
simplex ()
() () ()

bits are transmitted along a single wire  

data is transmitted in both directions  

it is only suitable for distances less than 5  


metres

Bits from the same byte are transmitted one  


after the other

data may not arrive in the correct sequence  

data is transmitted in both directions, but 


only one direction at a time

3(b) Any three from: 3


− Can charge/power the mobile device (at the same time)
− (Uses serial transmission so) data less likely to be skewed / corrupted
− Universal / industry standard / connection
− Cable can only be plugged in one way // Cannot be inserted incorrectly
− Fast transmission speed
− Backward compatible
− Supports different transmission speeds
− Automatically detects device // Automatically downloads drivers

© UCLES 2021 Page 6 of 12


0478/12 Cambridge IGCSE – Mark Scheme October/November 2021
PUBLISHED
Question Answer Marks

4 One mark per each correct term in the correct order. 7


− Capacitive
− Conductive // Capacitive
− Change
− Coordinates
− Resistive
− Circuit
− Manufacture

Question Answer Marks

5(a) Any three from: 3


− Password
− Add a biometric device to the laptop // set biometric password
− Use two-step verification // Use two factor authentication
− Physically lock the laptop away in a secure cupboard // Taking laptop with him at all times

5(b)(i) Any three from: 3


− A compression algorithm is used
− The resolution could be reduced
− Colour depth could be reduced // bits per pixel reduced
− Sounds not heard by human ear could be removed // Perceptual music shaping can be used
− Repeating frames could be removed

5(b)(ii) Any one from: 1


− Quality may be reduced
− Data is lost // original file cannot be reconstructed

5(c)(i) Any one from: 1


− Maintains quality // quality better than lossy
− Original file is retained // Data is not permanently lost
− A significant reduction in file size is not required

© UCLES 2021 Page 7 of 12


0478/12 Cambridge IGCSE – Mark Scheme October/November 2021
PUBLISHED
Question Answer Marks

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


− Takes more time to transmit file // Takes more time to upload to web server // Takes more time to download to
customer // Web page will load slower
− Takes up more storage space
− Data usage would be increased
− Uses more bandwidth

Question Answer Marks

6(a) Any one from: 1


− They both translate high-level language into machine code / low-level language
− They both check for errors
− They both report errors

6(b) Four from (Max 2 per translator): 4


− An interpreter translates and executes the code line by line
− … whereas a compiler translates and executes the whole code all in one go

− An interpreter stops translating and reports an error as it finds one


− … whereas a compiler produces an error report at the end of translation

− An interpreter does not produce an executable file


− … but a compiler does produce an executable file

− An interpreter will execute the code until it finds an error


− … whereas a compiler will not execute any code if there are errors present

− An interpreter allows correction of errors in real-time


− … whereas a compiler needs to retranslate the code each time after errors are found and corrected

6(c) − Assembler 1

© UCLES 2021 Page 8 of 12


0478/12 Cambridge IGCSE – Mark Scheme October/November 2021
PUBLISHED
Question Answer Marks

7 One mark per each correct row. 5

3D scanner Barcode QR code


Statement
() reader () reader ()

uses position and alignment markers for orientation when scanning 

scans the shape and appearance of an object 

uses reflected light from a laser to convert a  ()


black-and-white pattern into binary

can often be built into an Electronic Point Of Sale (EPOS) terminal, for  ()
example, a supermarket checkout

it is an example of an input device   

Question Answer Marks

8 Seven from: 7
− Timer is started
− Pressure sensor (within each mat)
− Sensor sends data to microprocessor
− Analogue data is converted to digital (using ADC)
− Microprocessor compares data to stored value(s)
− If data matches / in/out range microprocessor stops timer
− If data matches / in/out range microprocessor checks if data has come from correct colour mat sensor
− If data matches / in/out range microprocessor checks to see if timer is stopped at less than 1 second
− If data matches / in/out range microprocessor increments counter if timer is less than 1 second and colour/mat is
correct
− If correct colour/mat is hit, timer is reset and the whole process is repeated
− If data has not come from the correct colour mat sensor the game ends

© UCLES 2021 Page 9 of 12


0478/12 Cambridge IGCSE – Mark Scheme October/November 2021
PUBLISHED
Question Answer Marks

9(a) Any three from: e.g. 3


− A suitable description of any error that might occur
− A peripheral is connected/disconnected
− A key on a keyboard is pressed
− A mouse button click
− A phone/video call is received
− A buffer requires more data
− A printer has a paper jam
− A printer runs out of paper
− A printer runs out of ink
− When switching from one application to another

NOTE: If three suitable different errors are described, this can be awarded three marks.

9(b) Any one from: 1


− The computer would only start a new task when it had finished processing the current task // by example
− Computer will not be able to multitask
− Errors may not be dealt with
− Computer would become impossible to use

Question Answer Marks

10(a) − Enables an encrypted link (between the browser and the web server) // It encrypts the data 2
− … based on the authentication of an (SSL) certificate // and will only send it if the certificate is authentic

10(b) − Transport Layer Security // TLS 1

10(c) Any two from: 2


− URL begins with HTTPS
− Padlock symbol is locked
− Check the certificate is valid

© UCLES 2021 Page 10 of 12


0478/12 Cambridge IGCSE – Mark Scheme October/November 2021
PUBLISHED
Question Answer Marks

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

B X

© UCLES 2021 Page 11 of 12


0478/12 Cambridge IGCSE – Mark Scheme October/November 2021
PUBLISHED
Question Answer Marks

11(b) 4 marks for 8 correct outputs 4


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

A B C Working space X

0 0 0 1

0 0 1 1

0 1 0 1

0 1 1 1

1 0 0 1

1 0 1 1

1 1 0 1

1 1 1 0

11(c) − NOR 2
− XOR / EOR

© UCLES 2021 Page 12 of 12


Cambridge IGCSE™
* 8 1 3 0 5 0 5 1 1 4 *

COMPUTER SCIENCE 0478/22


Paper 2 Problem-solving and Programming October/November 2021

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 (LK/FC) 202711/3
© UCLES 2021 [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 integrated transport system has been designed to reduce the need for privately owned vehicles.
A vehicle is booked to take a passenger from home to a start station, from where they will travel to
an end station. A vehicle at the end station will take the passenger to their destination. Each stage
of the journey has a price code to represent the distance travelled. The prices for each stage are
shown:

Home to start Start station to end End station to


station station destination
Code Price ($) Code Price ($) Code Price ($)
C1 1.50 M1 5.75 F1 1.50
C2 3.00 M2 12.50 F2 3.00
C3 4.50 M3 22.25 F3 4.50
C4 6.00 M4 34.50 F4 6.00
C5 8.00 M5 45.00 F5 8.00
To book a journey, a passenger will enter a code for each stage and the start time of their journey.
The total price is calculated by adding together the price for each of the three stages. The total
price will be reduced by 40% when the start time of the journey is after 10:00.

Write and test a program or programs for the integrated transport booking system.
• Your program or programs must include appropriate prompts for the entry of data; data must
be validated on entry.
• Error messages and other output 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


Write a program to set up arrays to record the following:
• codes and prices for each of the three stages
• passenger accounts that include a unique passenger account number and name
• bookings that include a unique passenger account number, a start time of the journey, a code
for each stage of the journey, and a unique booking number for the journey.
Store the data for the code and price for each stage.

Task 2 – using the booking system


Extend Task 1 to achieve the following:
• Allow passengers to open an account by generating a unique passenger account number and
storing it along with their name in the arrays.
• Allow passengers to make a booking by first entering their unique passenger account number,
the start time of their journey, and a code for each stage of their journey. Check if the passenger
account number already exists.
• Generate a unique booking number for the journey.
• Calculate the total price of the journey, without any discount, and store the journey details.

Task 3 – applying a discount and checking the entry


Extend Task 2 to check the start time of the journey and if it is after 10:00, apply a 40% discount to
the total price.
Display the total price and booking details for the passenger to check, and allow them to either
confirm the details are correct or start again.

© UCLES 2021 0478/22/O/N/21


3

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

(a) (i) Identify one variable you could have used for Task 2 and state its use.

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

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

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

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

(ii) Describe the arrays you could have used in Task 1. Include the name, data type, use
and sample data for each array.

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

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

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

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

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

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

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

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

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

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

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

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

(b) Describe how you could validate the data entry for the input of the codes for the different
stages of the journey in Task 2.

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

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

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

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

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

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

© UCLES 2021 0478/22/O/N/21 [Turn over


4

(c) Write an algorithm to show how your program carries out Task 3, using either pseudocode,
programming statements or a flowchart. Assume Tasks 1 and 2 have already been completed.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

© UCLES 2021 0478/22/O/N/21


5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

© UCLES 2021 0478/22/O/N/21 [Turn over


6

(d) Explain how your program could be changed to count and store the number of bookings
made by each passenger. Then, after ten bookings have been made by a passenger, apply
an additional 10% discount to every future booking. Any programming statements used in
your answer must be fully explained.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

............................................................................................................................................. [4]
© UCLES 2021 0478/22/O/N/21
7

Section B

2 Tick (3) one box in each row to identify if the statement is about validation, verification or neither.

Validation Verification Neither


Statement
(3) (3) (3)
a check where data is re-entered to make sure no
errors have been introduced during data entry
an automatic check to make sure the data entered
has the correct number of characters

a check to make sure the data entered is sensible

a check to make sure the data entered is correct

[3]

3 A program checks that the data entered is between 1 and 100 inclusive.

Identify one piece of normal, extreme and erroneous test data for this program, and give a reason
for each.

Normal test data ...............................................................................................................................

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

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

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

Extreme test data .............................................................................................................................

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

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

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

Erroneous test data ..........................................................................................................................

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

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

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

© UCLES 2021 0478/22/O/N/21 [Turn over


8

4 The pseudocode algorithm should work as a calculator and output the result.

1 Continue 1
2 WHILE Continue = 0
3 OUTPUT "Enter 1 for +, 2 for -, 3 for * or 4 for /"
4 INPUT Operator
5 OUTPUT "Enter the first value"
6 INPUT Value1
7 OUTPUT "Enter the second value"
8 OUTPUT Value2
9 IF Operator
10 1: Answer Value1 + Value2
11 2: Answer Value1 - Value2
12 3: Answer Value1 * Value2
13 4: Answer Value1 / Value2
14 ENDCASE
15 OUTPUT "The answer is ", Value1
16 OUTPUT "Do you wish to enter more values (Yes or No)?"
17 INPUT MoreValues
18 IF MoreValues = "No"
19 THEN
20 Continue 1
21 ENDIF
22 UNTIL Continue = 0

(a) Find the five errors in the pseudocode and suggest a correction for each error.

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

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

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

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

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

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

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

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

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

Error 4 .......................................................................................................................................

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

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

Error 5 .......................................................................................................................................

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

...................................................................................................................................................
[5]
© UCLES 2021 0478/22/O/N/21
9

(b) The algorithm needs changing to allow only the numbers 1, 2, 3, or 4 to be entered for the
input variable Operator.

Write the pseudocode to perform this task and state where in the algorithm it would be
located.

Pseudocode ..............................................................................................................................

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

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

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

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

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

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

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

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

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

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

Location in algorithm ................................................................................................................

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

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

© UCLES 2021 0478/22/O/N/21 [Turn over


10

5 The flowchart represents an algorithm.

The algorithm will terminate if –1 is entered at the List input.

START

List1 ←0
List2 ←0
INPUT
List

Yes IS
List = –1 ?

No

INPUT
Value

IS
List = 1 ?
Yes
List1 ← List1 + Value
No

IS
List = 2 ?
Yes
List2 ← List2 + Value
OUTPUT
"List 1 = ", List1
No

OUTPUT OUTPUT
"List 2 = ", List2 "Input Error"

IS Yes
List1 > List2 ?

No
OUTPUT
"List 1 is greatest"

OUTPUT
"List 2 is greatest"

END

© UCLES 2021 0478/22/O/N/21


11

Complete the trace table for the algorithm using this input data:

2, 77, 2, 16, 1, 35, 2, –7, 5, 18, 1, 11, 1, 12, 2, 20, –1, 18

List Value List1 List2 OUTPUT

[5]

© UCLES 2021 0478/22/O/N/21 [Turn over


12

6 A pet supplier uses the database table, STOCK, to keep records of its products for pets.

The fields are:

Field name Description


ProductID code to identify the product
ProductName name of product
ProductDescription information about the product
Animal type of animal the product is for, e.g. cat, bird, horse
ProductType type of product, e.g. food, toy, medicine
InStock whether the product is in stock or not

(a) (i) Identify the field that could have a Boolean data type.

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

(ii) Identify the field that should be used as the primary key.

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

(b) Complete the query-by-example grid to output the products intended for a cat that are in
stock. Display only the primary key and the name of the products. The output should be
sorted by the primary key.

Field:

Table:

Sort:

Show:

Criteria:

or:

[4]

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 the Cambridge Assessment Group. Cambridge Assessment is the brand name of the University of
Cambridge Local Examinations Syndicate (UCLES), which itself is a department of the University of Cambridge.

© UCLES 2021 0478/22/O/N/21


Cambridge IGCSE™

COMPUTER SCIENCE 0478/22


Paper 2 October/November 2021
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 2021 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 2021 [Turn over


0478/22 Cambridge IGCSE – Mark Scheme October/November 2021
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 2021 Page 2 of 13


0478/22 Cambridge IGCSE – Mark Scheme October/November 2021
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 2021 Page 3 of 13


0478/22 Cambridge IGCSE – Mark Scheme October/November 2021
PUBLISHED
Question Answer Marks

Section A

1(a)(i) One mark per point 2


• Variable PassengerID// StartStage
• Use Storing the unique ID number of the passenger// Storing/inputting the start stage of the journey

1(a)(ii) One mark per point 5


MP1 Name of array
MP2 Data type of array
MP3 Sample data for array
MP4 Use of array
MP5 At least two complete arrays with all of the above

Array name Data type Sample data Use


JourneyStage1 string C1 to store the code for the home to start station
PriceStage1 real 1.50 to store the price of first stage of the journey

1(b) One mark per bullet point 3


MP1 Use of validation check, e.g. range check, type check, presence check, length check, format check
MP2 Use of conditional statement to check if the validation fails ...
MP3 … a re-entry is requested
MP4 Use of loop to repeat the process until an acceptable answer is input
MP5 More than one appropriate validation check used / described.

1(c) Any six from: 6


MP1 Conditional statement to check departure time against 10:00
MP2 … calculate 40% discount // calculate 60% of the original price
MP3 … calculate discounted total price
MP4 Output the discounted total price
MP5 Output the booking details with suitable messages
MP6 Input with prompt for passenger confirmation …
MP7 … attempt at action following the confirmation input
MP8 Repeating booking data entry if incorrect
MP9 Re-checking journey details for correctness

© UCLES 2021 Page 4 of 13


0478/22 Cambridge IGCSE – Mark Scheme October/November 2021
PUBLISHED
Question Answer Marks

1(c) Example answer


// Tasks 1 and 2 completed
IF CollectedTime[Index] > 10:00
THEN
JourneyCost[Index] ← JouneyCost[Index] * 0.6
ENDIF
PRINT "Your journey cost is: ", JourneyCost[Index]
PRINT "Your journey details are: ", PassengerID[Index], JourneyTime[Index],
JourneyCodes[Index], JourneyID[Index]
PRINT "Are these details correct? (Y or N)"
INPUT Correct
IF Correct = "N"
THEN
WHILE Correct = "N"
PRINT "Re-enter your journey details"
PRINT "Correct passenger ID "
INPUT PassengerID[Index]
PRINT "Correct journey time "
INPUT JourneyTime[Index]
PRINT "Correct journey codes "
INPUT JourneyCodes[Index]
PRINT "Your revised journey details are: ", PassengerID[Index],
JourneyTime[Index], JourneyCodes[Index]
PRINT "Are these details correct? (Y or N)"
INPUT Correct
ENDWHILE
ENDIF
//Program continues

1(d) Explanation of how each of the following could be done 4


Any four from:
MP1 Declaring/using a counter to store the number of bookings for each passenger
MP2 Updating the counter for the number of bookings made by each passenger
MP3 Attempt to check the number of bookings …
MP4 … for the correct condition e.g. if the number of bookings is more than 10 / equal to 10
MP5 Apply the extra discount to the total price of future journeys

© UCLES 2021 Page 5 of 13


0478/22 Cambridge IGCSE – Mark Scheme October/November 2021
PUBLISHED
Question Answer Marks

Section B

2 One mark for two correct rows 3


Two marks for three correct rows
Three marks for four correct rows.

Statement Validation Verification Neither


() () ()

a check where data is re-entered to make sure no errors have 


been introduced during data entry

an automatic check to make sure the data entered has the correct 
number of characters

a check to make sure the data entered is sensible 

a check to make sure the data entered is correct 

Question Answer Marks

3 One mark per bullet point 6

Normal test data


• Test data e.g. 50 (allow any number between 1 and 100 inclusive)
• Reason Data that is within range and should be accepted

Extreme test data


• Test data 100 / 1
• Reason Data at the maximum / minimum end of the range and should be accepted

Erroneous test data


• Test data e.g. 300 (allow anything that isn’t between 1 and 100 inclusive, including other data types)
• Reason Data outside the range that should be rejected

© UCLES 2021 Page 6 of 13


0478/22 Cambridge IGCSE – Mark Scheme October/November 2021
PUBLISHED
Question Answer Marks

4(a) One mark for error identified and suggested correction (Max three) 5

Line 8 OUTPUT Value2 – should be INPUT Value2


Line 9 IF Operator – should be CASE OF Operator
Line 15 OUTPUT "The answer is ", Value1 – should be Answer

The loop may be corrected using a number of alternative methods:

One mark for error identified and suggested correction (Max two)

Method 1
Line 1 Continue ← 1 should be Continue ← 0
Line 22 UNTIL Continue = 0 should be ENDWHILE // Line 2 WHILE Continue = 0 should be REPEAT and Line
22 UNTIL Continue = 0 should be Until Continue = 1

OR

Method 2
Line 2 WHILE Continue = 0 should be REPEAT
Line 20 Continue ← 1 should be Continue ← 0 // Line 1 Continue ← 1 should be Continue ← 0 and Line
22 UNTIL Continue = 0 should be Until Continue = 1

OR

Method 3
Line 2 WHILE Continue = 0 should be WHILE Continue = 1
Line 20 Continue ← 1 should be Continue ← 0 and Line 22 UNTIL Continue = 0 should be ENDWHILE

© UCLES 2021 Page 7 of 13


0478/22 Cambridge IGCSE – Mark Scheme October/November 2021
PUBLISHED
Question Answer Marks

4(a) Corrected algorithm example 1


1 Continue ← 0
2 WHILE Continue = 0 (DO)
3 OUTPUT "Enter 1 for +, 2 for -, 3 for * or 4 for /"
4 INPUT Operator
5 OUTPUT "Enter the first value"
6 INPUT Value1
7 OUTPUT "Enter the second value"
8 INPUT Value2
9 CASE OF Operator
10 1: Answer ← Value1 + Value2
11 2: Answer ← Value1 - Value2
12 3: Answer ← Value1 * Value2
13 4: Answer ← Value1 / Value2
14 ENDCASE
15 OUTPUT "The answer is ", Answer
16 OUTPUT "Do you wish to enter more values (Yes or No)?"
17 INPUT MoreValues
18 IF MoreValues = "No"
19 THEN
20 Continue ← 1
21 ENDIF
22 ENDWHILE

© UCLES 2021 Page 8 of 13


0478/22 Cambridge IGCSE – Mark Scheme October/November 2021
PUBLISHED
Question Answer Marks

4(a) Corrected algorithm example 2


1 Continue ← 1
2 REPEAT
3 OUTPUT "Enter 1 for +, 2 for -, 3 for * or 4 for /"
4 INPUT Operator
5 OUTPUT "Enter the first value"
6 INPUT Value1
7 OUTPUT "Enter the second value"
8 INPUT Value2
9 CASE OF Operator
10 1: Answer ← Value1 + Value2
11 2: Answer ← Value1 - Value2
12 3: Answer ← Value1 * Value2
13 4: Answer ← Value1 / Value2
14 ENDCASE
15 OUTPUT "The answer is ", Answer
16 OUTPUT "Do you wish to enter more values (Yes or No)?"
17 INPUT MoreValues
18 IF MoreValues = "No"
19 THEN
20 Continue ← 0
21 ENDIF
22 UNTIL Continue = 0

© UCLES 2021 Page 9 of 13


0478/22 Cambridge IGCSE – Mark Scheme October/November 2021
PUBLISHED
Question Answer Marks

4(b) One mark per bullet 5


MP1 Appropriate loop (begin and end) / otherwise selection
MP2 Testing both ends of condition
MP3 Suitable message
MP4 Input/re-input

WHILE Operator < 1 OR Operator > 4 (DO)


OUTPUT "Enter 1, 2, 3 or 4"
INPUT Operator
ENDWHILE

Alternative answer
REPEAT
IF Operator < 1 OR Operator > 4
THEN
OUTPUT "Enter 1, 2, 3 or 4"
INPUT Operator
ENDIF
UNTIL Operator >= 1 AND Operator <= 4

One mark

After line 4 / between lines 2 and 5

© UCLES 2021 Page 10 of 13


0478/22 Cambridge IGCSE – Mark Scheme October/November 2021
PUBLISHED
Question Answer Marks

5 One mark for each correct column 5

List Value List1 List2 OUTPUT

0 0

77 77

16 93

35 35

-7 86

© UCLES 2021 Page 11 of 13


0478/22 Cambridge IGCSE – Mark Scheme October/November 2021
PUBLISHED
Question Answer Marks

5 List Value List1 List2 OUTPUT

18 Input Error

11 46

12 58

20 106

-1 List 1 = 58

List 2 = 106

List 2 is greatest

© UCLES 2021 Page 12 of 13


0478/22 Cambridge IGCSE – Mark Scheme October/November 2021
PUBLISHED
Question Answer Marks

6(a)(i) InStock 1

6(a)(ii) ProductID 1

6(b) One mark for correct fieldnames 4


One mark for correct table names and show fields
One mark for correct sort
One mark for correct search criteria in all columns

Field: ProductID ProductName Animal InStock

Table: STOCK STOCK STOCK STOCK

Sort: Ascending

Show:     

Criteria: =“cat” =Yes

or:

© UCLES 2021 Page 13 of 13

You might also like