Cambridge International General Certificate of Secondary Education
Cambridge International General Certificate of Secondary Education
com
Write your centre number, candidate number and name in the spaces at the top of this page.
Write in dark blue or black pen.
You may use an HB pencil for any diagrams, graphs or rough working.
Do not use staples, paper clips, glue or correction fluid.
DO NOT WRITE IN ANY BARCODES.
DO NOT ATTEMPT TASKS 1, 2 AND 3 in the pre-release material; these are for information only.
You are advised to spend no more than 40 minutes on Section A (Question 1).
No marks will be awarded for using brand names of software packages or hardware.
At the end of the examination, fasten all your work securely together.
The number of marks is given in brackets [ ] at the end of each question or part question.
This syllabus is regulated for use in England, Wales and Northern Ireland as a Cambridge International Level 1/Level 2 Certificate.
DC (LK/CB) 162269/1
© UCLES 2019 [Turn over
[Link]
2
Section A
You are advised to spend no longer than 40 minutes answering this section.
Use the pre-release material and your experience from attempting the tasks before the examination to
answer Question 1.
Pre-release material
A pizza ordering service allows customers to design their own pizza. There are three sizes: small,
medium and large. A pizza can have a thick or thin base. All pizzas come with tomato and cheese
toppings as standard and there are six additional types of topping available:
• Pepperoni
• Chicken
• Extra cheese
• Mushrooms
• Spinach
• Olives
Pizzas always come with tomato and cheese toppings as standard, and can have up to three
additional toppings. Customers need to be able to design their own pizza and then confirm or
change it. Records are kept showing the number of pizzas sold for each base and size. The number
of sales for each additional topping is also recorded.
Write and test a program or programs for the pizza ordering service.
• Your program or programs must include appropriate prompts for the entry of data.
• 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.
The customer is given choices of size, base and additional toppings (number and type) as stated
above. Only valid choices can be accepted. The customer is asked to confirm their order or alter
their choices or not proceed. If the customer confirms their order they are given a unique order
number.
Extend TASK 1 to record totals for the choices made for ordered pizzas only and calculate the total
number of pizzas ordered.
TASK 3 – Find the most and least popular additional pizza toppings.
Using your results from TASK 2, display the most popular and least popular additional toppings as a
percentage of the total number of additional toppings ordered.
1 (a) All variables, constants and other identifiers should have meaningful names.
State one constant and one variable that you could have used for Task 1. Give the value that
would be assigned to the constant. Give the data type for the variable. Explain what each one
could be used for.
Value .........................................................................................................................................
Use ...........................................................................................................................................
...................................................................................................................................................
Use ...........................................................................................................................................
...................................................................................................................................................
[6]
(b) Explain how you would need to change your program for Task 1 if there were three bases to
choose from (thick, thin and extra crispy).
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [2]
(c) (i) Write an algorithm for choosing the additional toppings in Task 1, using either
pseudocode, programming statements or a flowchart. Your algorithm must only include
this part of Task 1.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [5]
© UCLES 2019 0478/22/F/M/19 [Turn over
[Link]
6
(ii) Explain how your algorithm in part (c)(i) only allowed valid choices for the additional
pizza toppings.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [3]
(d) Explain how your program completed Task 3. Any programming statements used in your
answer must be fully explained.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [4]
Section B
2 (a) An algorithm has been written in pseudocode to input 50 numbers and total only the positive
numbers.
Count 1 ←
Total ←
Count
REPEAT
INPUT Number
IF Number <> 0
THEN
Total ←
Total + Count
ENDIF
Count ←
Count + 1
UNTIL Count < 50
PRINT Total
Find the four errors in the pseudocode and suggest a correction for each error.
Error 1 .......................................................................................................................................
Correction .................................................................................................................................
...................................................................................................................................................
Error 2 .......................................................................................................................................
Correction .................................................................................................................................
...................................................................................................................................................
Error 3 .......................................................................................................................................
Correction .................................................................................................................................
...................................................................................................................................................
Error 4 .......................................................................................................................................
Correction .................................................................................................................................
...................................................................................................................................................
[4]
(b) Show how you would change the corrected algorithm to only total numbers greater than 0
and less than 20.
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [2]
3 This flowchart inputs the type of passenger for a survey: S for Senior, A for Adult, C for Child. All
other values are ignored, apart from Z which ends the process.
START
Senior 0
Adult 0
Child 0
INPUT Type
Is Type = Yes
Senior Senior + 1
"S" ?
No
Is Type = Yes
Adult Adult + 1
"A" ?
No
Is Type = Yes
Child Child + 1
"C" ?
No
No Is Type =
"Z" ?
Yes
OUTPUT "Seniors ", Senior
OUTPUT "Adults ", Adult
OUTPUT "Children ", Child
END
[5]
4 For each of the four groups of statements in the table, place a tick in the correct column to show
whether it is an example of Selection or Repetition.
FOR X ← 1 TO 10
SUM ← SUM + 1
NEXT X
WHILE X > 10 DO
SUM ← SUM + 1
X ←X - 1
ENDWHILE
IF X > 10
THEN
SUM ← SUM + 1
X ←X - 1
ENDIF
REPEAT
SUM ← SUM + 1
X ←X - 1
UNTIL X > 10
[4]
5 A programmer restricts input values to less than 90 and greater than 60.
...................................................................................................................................................
...................................................................................................................................................
[2]
(b) State three different types of test data the programmer would need to use. Give an example
of each type and the reason that the programmer chose that test data.
Type 1 .......................................................................................................................................
Example ....................................................................................................................................
Reason .....................................................................................................................................
...................................................................................................................................................
Type 2 .......................................................................................................................................
Example ....................................................................................................................................
Reason .....................................................................................................................................
...................................................................................................................................................
Type 3 .......................................................................................................................................
Example ....................................................................................................................................
Reason .....................................................................................................................................
...................................................................................................................................................
[9]
6 A database table, BIKETYRES, is used to keep a record of tyres for sale in a cycle shop.
Tyres are categorised by width and diameter in millimetres, whether they have an inner tube and
the type of terrain for which they are designed.
The query-by-example grid below displays the tyre code and the stock level of all 28 mm width
tyres suitable for mixed terrain.
Alter the query to show the tyre code and stock level in ascending order of stock level for all
24 mm asphalt terrain tyres. Write the new query in the following query-by-example grid.
Field:
Table:
Sort:
Show:
Criteria:
or:
[4]
© UCLES 2019 0478/22/F/M/19
[Link]
15
BLANK PAGE
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 [Link] 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.