Cambridge International General Certificate of Secondary Education
Cambridge International General Certificate of Secondary Education
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 approved for use in England, Wales and Northern Ireland as a Cambridge International Level 1/Level 2 Certificate.
DC (SR/SG) 150262/3
© UCLES 2018 [Turn over
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
You are working at a local take-away shop and you have decided to write a program to track daily
takings and profit. Here is the menu:
1 (a) All arrays, variables, constants and other identifiers should have meaningful names.
(i) State the name, data type and use of two arrays you created for Task 1.
Use .....................................................................................................................................
...........................................................................................................................................
Use .....................................................................................................................................
...........................................................................................................................................
[4]
(ii) State the name, data type and use of two variables you have created for Task 2.
Use .....................................................................................................................................
...........................................................................................................................................
Use .....................................................................................................................................
...........................................................................................................................................
[4]
(b) Write an algorithm to enter each item code and quantity. Then when the order is completely
entered, generate a unique order code (part of Task 2), using either pseudocode,
programming statements or a flowchart. You should assume that Task 1 has already been
completed.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
© UCLES 2018 0478/21/O/N/18
5
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[5]
© UCLES 2018 0478/21/O/N/18 [Turn over
6
(c) Explain how your program calculates the profit using your input (last part of Task 3) with
variable profit percentage and outputs the results. Any programming statements you use in
your answer must be fully explained.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[4]
(d) State three items of test data you could use in Task 3 to test the input of the percentage profit
value and explain why you chose them.
Reason ......................................................................................................................................
...................................................................................................................................................
Reason ......................................................................................................................................
...................................................................................................................................................
Reason ......................................................................................................................................
...................................................................................................................................................
[3]
Section B
2 Six terms associated with programming and six descriptions are listed.
Draw a line to link each term with its most appropriate description.
Term Description
[5]
3 Describe, giving a different example for each, the purpose of these validation checks used in
programming.
..........................................................................................................................................................
..........................................................................................................................................................
Example ............................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
Example ............................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
Example ............................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
[6]
Total 0
FOR Count 1 TO 50
INPUT Num
Total Total + Num
NEXT Count
OUTPUT Total
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[3]
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[3]
(c) Describe how you could modify the original algorithm shown at the start of question 4, to
allow any number of inputs.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[2]
START
Flag True
INPUT
TestNum
Num TestNum – 1
Yes Is Num = No
1?
Num Num – 1
Yes Is TestNum / No
Flag False Num = TestNum
DIV Num ?
Is Flag = Yes
True ?
No
OUTPUT
TestNum
END
[2]
[2]
...................................................................................................................................................
...............................................................................................................................................[1]
6 The database table, PCSTOCK, is a part of the database in an electronics shop, showing some of
the desktop (DT), tablet (TB) and laptop (LT) computers they have in stock.
(a) Complete the table to show the most appropriate data type for each field based on the data
shown in the table at the start of question 6.
(b) Using the query-by-example grid, write a query to identify all the desktop computers with a
hard drive larger than 1000 GB. All fields in the table should be shown, sorted in descending
order by price.
Field:
Table:
Sort:
Show:
Criteria:
or:
[4]
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 International
Examinations Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cie.org.uk after
the live examination series.
Cambridge International Examinations is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local
Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge.