Specimen (2023) QP - Paper 2 CAIE Computer Science GCSE
Specimen (2023) QP - Paper 2 CAIE Computer Science GCSE
Specimen (2023) QP - Paper 2 CAIE Computer Science GCSE
Cambridge IGCSE™
*0123456789*
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.
(a)
Draw a line to link each pseudocode description to the most appropriate pseudocode
statement.
FOR…TO…NEXT
IF…THEN…ELSE…ENDIF
WHILE…DO…ENDWHILE
CASE…OF…OTHERWISE…ENDCASE
REPEAT…UNTIL
[4]
(b) Using a single loop, write an algorithm in pseudocode to output 50 names that have been
stored in the array, Name[]
number <--- 0
....................................................................................................................................................
WHILE number < 50 DO
....................................................................................................................................................
OUTPUT Name [number]
....................................................................................................................................................
number = number + 1
ENDWHILE
....................................................................................................................................................
....................................................................................................................................................
................................................................................................................................................[3]
2 Describe the purpose of validation and verification checks during data entry.
Validation check.................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
Verification check...............................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
[4]
3 Tick () one box to show the named section of a program that performs a specific task.
A file
B function
C parameter
D process
[1]
Draw a structure diagram for this part of the satellite navigation system.
[4]
5 An algorithm has been written in pseudocode to input some numbers. It only outputs any numbers
that are greater than or equal to 100. The number 999 is not output and stops the algorithm.
INPUT Number
WHILE Numbers <> 999 DO
IF Number > 100
THEN
OUTPUT Number
ENDIF
ENDWHILE
OUTPUT Number
(a)
Identify the four errors in the pseudocode and suggest corrections.
Error 1 ........................................................................................................................................
Correction ..................................................................................................................................
....................................................................................................................................................
Error 2 ........................................................................................................................................
Correction ..................................................................................................................................
....................................................................................................................................................
Error 3 ........................................................................................................................................
Correction ..................................................................................................................................
....................................................................................................................................................
Error 4 ........................................................................................................................................
Correction ..................................................................................................................................
....................................................................................................................................................
[4]
(b) Write a pseudocode statement to change the corrected algorithm to output all numbers
between 100 and 200 inclusive.
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
............................................................................................................................................... [2]
(a)
Draw a logic circuit for this logic expression.
B X
[4]
(b)
Complete the truth table from the given logic expression.
Working space
A B C X
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
[4]
BLANK PAGE
START
Flag 0
Count 1
IS Name[Count] Yes
> Name[Count + 1]? Temp Name[Count]
No Name[Count] Name[Count + 1]
Name[Count + 1] Temp
Flag 1
Count Count + 1
No IS Count
=4?
Yes
No IS Flag
=0?
Yes
STOP
(a)
The array Name[1:4] used in the flowchart contains the following data:
Complete the trace table using the data given in the array.
[5]
(b)
Describe what the algorithm represented by the flowchart is doing.
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
............................................................................................................................................... [2]
10
8 A programmer has written an algorithm to check that prices are less than $10.00
10.00 .................................................................................................................................................
...........................................................................................................................................................
9.99 ...................................................................................................................................................
...........................................................................................................................................................
ten .....................................................................................................................................................
...........................................................................................................................................................
[3]
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...................................................................................................................................................... [3]
Tick () one box which accurately describes the use of the variable Inches
A answer
B call
C parameter
D response
[1]
© UCLES 2020 0478/02/SP/23
PMT
11
(a)
State the number of records in 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.
............................................................................................................................................
....................................................................................................................................... [1]
12
(c)
Complete the table to identify the most appropriate data type for each field based on the data
shown in the database table, 2018MOV.
CatNo
Title
Genre1
Streaming
[2]
(d)
Complete the structured query language (SQL) to return the category number and title for all
Comedy movies.
.................................................. 2018MOV
13
• X stores a string
• Y stores a position in the string (e.g. 2)
• Z stores the number of characters in the string.
(a)
Write pseudocode statements to declare the variables X, Y and Z.
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
............................................................................................................................................... [3]
(b)
The function Length(X) finds the length of a string X.
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
............................................................................................................................................... [6]
14
13 The 1D array StudentName[] contains the names of students in a class. The 2D array
StudentMark[] contains the mark for each subject, for each student. The position of
each student’s data in the two arrays is the same, for example, the student in position 10 in
StudentName[] and StudentMark[] is the same.
The variable ClassSize contains the number of students in the class. The variable SubjectNo
contains the number of subjects studied. All students study the same number of subjects.
The arrays and variables have already been set up and the data stored.
You must use pseudocode or program code and add comments to explain how your code works.
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
15
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
© UCLES 2020 0478/02/SP/23 [Turn over
PMT
16
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
...........................................................................................................................................................
.................................................................................................................................................... [15]
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.
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.