Cambridge IGCSE: Computer Science 0478/21
Cambridge IGCSE: Computer Science 0478/21
, ,
Cambridge IGCSE™
¬O. 4mHuOªE^|6W
¬a-|W¤XwqEYtg4
¥¥¥Uuu¥u¥e¥ U U
* 6 5 0 8 7 1 2 2 3 2 *
1 hour 45 minutes
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.
DC (WW/SG) 336981/3
© UCLES 2024 [Turn over
1 Tick (✓) one box to show which check is used for verification when data is input.
A length check
B range check
C type check
D visual check
[1]
A flowchart
B trace table
C truth table
D variable
[1]
Draw one or more lines from each operator to its correct operator type.
>=
Boolean
AND
[4]
DO NOT WRITE IN THIS MARGIN
ĬÍĊ®Ġ´íÈõÏĪÅĊßú¸þ×
© UCLES 2024 Ĭá¯ûÖĪþĆßĊćêġĊėČęĂ 0478/21/O/N/24
ĥµõÕµĕåĕÕĥµÅąĕĥÕµÕ
3
, ,
4 Identify three stages of the program development life cycle from the following list of words.
1 ...........................................................................
2 ...........................................................................
DO NOT WRITE IN THIS MARGIN
3 ...........................................................................
[3]
5 Describe three methods that are used to design and construct a solution to a problem.
Method 1 ..........................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
DO NOT WRITE IN THIS MARGIN
..........................................................................................................................................................
Method 2 ..........................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
Method 3 ..........................................................................................................................................
..........................................................................................................................................................
DO NOT WRITE IN THIS MARGIN
..........................................................................................................................................................
..........................................................................................................................................................
[6]
DO NOT WRITE IN THIS MARGIN
ĬÏĊ®Ġ´íÈõÏĪÅĊßü¸þ×
© UCLES 2024 Ĭá°üÎĠĂöÚðúğµòÃČĩĂ
ĥµąĕõõÅõÅĕĥÅąõąĕåÕ
0478/21/O/N/24 [Turn over
6 An incomplete algorithm has been written in pseudocode to count the number of zeros stored in
an array and total the non-zero values.
(b) Write the pseudocode to display, with suitable messages, the number of zeros stored in the
array and the total of the non-zero values.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [3]
The array:
A ..............................................................................................................................................
DO NOT WRITE IN THIS MARGIN
The variables:
T ................................................................................................................................................
C ................................................................................................................................................
I ................................................................................................................................................
[3]
ĬÍĊ®Ġ´íÈõÏĪÅĊÝú¸Ā×
© UCLES 2024 Ĭá°ùÎĦôóÝòñĨėÎġĜđĂ 0478/21/O/N/24
ĥąÕĕµõÅÕåµĕÅÅõåĕµÕ
5
, ,
X
W
Y
DO NOT WRITE IN THIS MARGIN
(a) Write a logic expression for the given logic circuit. Do not attempt to simplify the logic
expression.
W = ...........................................................................................................................................
............................................................................................................................................. [3]
(b) Complete the truth table from the given logic circuit.
DO NOT WRITE IN THIS MARGIN
Working space
X Y Z W
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
DO NOT WRITE IN THIS MARGIN
1 1 0
1 1 1
[4]
DO NOT WRITE IN THIS MARGIN
ĬÏĊ®Ġ´íÈõÏĪÅĊÝü¸Ā×
© UCLES 2024 Ĭá¯úÖĤðăÜĈĀáÃæµĜġĂ
ĥąåÕõĕåµµÅÅÅÅĕÅÕåÕ
0478/21/O/N/24 [Turn over
8 A programmer is designing a program to check the length of a password and to check if the
password input is the same as the stored password.
START
STOP
[6]
ĬÑĊ®Ġ´íÈõÏĪÅĊàüµþ×
© UCLES 2024 Ĭá°úÙĪĘĉÔăíÜãÎØ´đĂ 0478/21/O/N/24
ĥÕąÕõµåĕõåĥÅąĕĥĕõÕ
7
, ,
...................................................................................................................................................
...................................................................................................................................................
DO NOT WRITE IN THIS MARGIN
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [3]
...................................................................................................................................................
...................................................................................................................................................
DO NOT WRITE IN THIS MARGIN
...................................................................................................................................................
............................................................................................................................................. [2]
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
ĬÓĊ®Ġ´íÈõÏĪÅĊàúµþ×
© UCLES 2024 Ĭá¯ùÑĠĜùåõĄč÷æĄ´ġĂ
ĥÕõĕµÕÅõĥÕµÅąõąÕĥÕ
0478/21/O/N/24 [Turn over
01 REPEAT
02 OUTPUT "Please enter temperature "
03 INPUT Temp
04 IF Temperature = 999
05 THEN
06 IF Temperature > 38.0
07 THEN
08 OUTPUT "Temperature too high"
Correction .................................................................................................................................
...................................................................................................................................................
Correction .................................................................................................................................
Correction .................................................................................................................................
...................................................................................................................................................
Correction .................................................................................................................................
DO NOT WRITE IN THIS MARGIN
...................................................................................................................................................
[4]
ĬÑĊ®Ġ´íÈõÏĪÅĊÞüµĀ×
© UCLES 2024 Ĭá¯üÑĦĪðÒûċĖÕĊâäęĂ 0478/21/O/N/24
ĥĥåĕõÕÅÕąõÅÅÅõåÕõÕ
9
, ,
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [2]
(c) Complete the trace table for the corrected algorithm using this data:
Temperature OUTPUT
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
[2]
DO NOT WRITE IN THIS MARGIN
ĬÓĊ®Ġ´íÈõÏĪÅĊÞúµĀ×
© UCLES 2024 Ĭá°ûÙĤĦĀçýöÓāòöäĩĂ
ĥĥÕÕµµåµĕąĕÅÅĕÅĕĥÕ
0478/21/O/N/24 [Turn over
10 A shop that sells cheese has set up a new database table called CheeseStock to store details of
the cheeses available for sale. Part of this table is given.
(a) State the number of records in this part of the database table.
............................................................................................................................................. [1]
(b) (i) Give the name of the field that would be used for the primary key.
..................................................................................................................................... [1]
(ii) State the reason for choosing this field for the primary key.
DO NOT WRITE IN THIS MARGIN
...........................................................................................................................................
..................................................................................................................................... [1]
ĬÑĊ®Ġ´íÈõÏĪÅĊßü·þ×
© UCLES 2024 Ĭá®üÜĨĢĪÐôĄ°¹ČÆĜġĂ 0478/21/O/N/24
ĥµÅÕõÕĥÕåÅÅąÅÕåÕÅÕ
11
, ,
(c) Write the output from this structured query language (SQL) statement.
...................................................................................................................................................
...................................................................................................................................................
DO NOT WRITE IN THIS MARGIN
............................................................................................................................................. [2]
(d) (i) Complete this SQL statement to display only the name of all the cheeses that are out of
stock.
SELECT .............................................................................................................................
FROM ..................................................................................................................................
WHERE ............................................................................................................................ ;
[3]
DO NOT WRITE IN THIS MARGIN
(ii) Explain how one of the lines in your statement in part (d)(i) could be changed to display
the same information.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [2]
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
ĬÓĊ®Ġ´íÈõÏĪÅĊßú·þ×
© UCLES 2024 ĬáûÔĢĞĚéĆíùĝôĒĜđĂ
ĥµµĕµµąµµµĕąÅµÅĕÕÕ
0478/21/O/N/24 [Turn over
11 A running club has 200 members who compete in a 1-kilometre running competition every month.
Members’ names are stored in the one-dimensional (1D) array MemberName[]
Each member’s time, in seconds, for the 1-kilometre run will be stored in another one-dimensional
(1D) array MemberTime[]
The position of each member’s data in the two arrays is the same. For example, the member
stored at index 10 in MemberName[] and at index 10 in MemberTime[] is the same.
The running club awards a small prize to the members who have the top three times.
The club also awards certificates to all members with a time under 240 seconds.
You must use pseudocode or program code and add comments to explain how your code works.
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
DO NOT WRITE IN THIS MARGIN
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
ĬÑĊ®Ġ´íÈõÏĪÅĊÝü·Ā×
© UCLES 2024 ĬáúÔĬĐďÎČöò¿Ð´ČĩĂ 0478/21/O/N/24
ĥąĥĕõµąĕÕĕĥąąµĥĕÅÕ
13
, ,
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
DO NOT WRITE IN THIS MARGIN
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
DO NOT WRITE IN THIS MARGIN
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
DO NOT WRITE IN THIS MARGIN
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
DO NOT WRITE IN THIS MARGIN
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
ĬÓĊ®Ġ´íÈõÏĪÅĊÝú·Ā×
© UCLES 2024 Ĭá®ùÜĞĔğëîċ·ěèĨČęĂ
ĥąĕÕµÕĥõÅĥµąąÕąÕÕÕ
0478/21/O/N/24 [Turn over
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
.................................................................................................................................................. [15]
DO NOT WRITE IN THIS MARGIN
ĬÍĊ®Ġ´íÈõÏĪÅĊÞù¶Ă×
© UCLES 2024 ĬáûÙĤğėÙüĀĜ·íĤ¼đĂ 0478/21/O/N/24
ĥåĕĕõµåÕåõµÅÅĕåĕąÕ
15
, ,
BLANK PAGE
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
DO NOT WRITE IN THIS MARGIN
ĬÏĊ®Ġ´íÈõÏĪÅĊÞû¶Ă×
© UCLES 2024 Ĭá®üÑĦģħàþñÍģą¸¼ġĂ 0478/21/O/N/24
ĥåĥÕµÕŵµąĥÅÅõÅÕĕÕ
downloaded from https://pseudocode.pro
* 0000800000016 *
BLANK PAGE
Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the
publisher will be pleased to make amends at the earliest possible opportunity.
To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge
Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download
at www.cambridgeinternational.org after the live examination series.
Cambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge
Local Examinations Syndicate (UCLES), which is a department of the University of Cambridge.
ĬÍĊ®Ġ´íÈõÏĪÅĊàù¶Ą×
© UCLES 2024 Ĭá®ùÑĠđĢÛĄúÖÁéĖìęĂ 0478/21/O/N/24
ĥĕµÕõÕÅĕÕåĕÅąõĥÕąÕ