Question 8(e) 2016 · May-June · Paper 22 · 22 marks
Reveal official mark-scheme answer
The answer for this question is in the official mark scheme: open the mark scheme.
Show text version of question
Question 8
Part (e)
Question 8
UNTIL Counter = 10
This code works, but it is inefficient.
(i)
Suggest three improvements that could be made.
1 .................................................................................................................................................
...................................................................................................................................................
2 .................................................................................................................................................
...................................................................................................................................................
3 .................................................................................................................................................
...............................................................................................................................................[3]
(ii)
Rewrite the program code with your improvements.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[3]
Question 7
3 The flowchart below calculates the number of tins of paint required to paint walls. The flowchart inputs the height and width of a wall in metres, the number of doors and the number of windows.
START
Area 0 Tins 0
INPUT Height, Width, Doors, Windows
Is Yes Height Tins INT(Area/10 + 0.5) = –1?
No
OUTPUT Tins Area Area + Height * Width
- Doors * 1.5 – Windows
END
Complete the trace table for the input data:
3, 5, 1, 0, 3, 7, 0, 0, 3, 5, 0, 3, 3, 7, 1, 1, –1, 0, 0, 0
Area Tins Height Width Doors Windows
Question 8
4 Four statement types and four examples are shown below.
Draw a line to connect each statement type to the correct example.
Statement type Example
Assignment FOR X 1 TO 10
Iteration READ X
Input PRINT X
Output X Y + Z
5 A programmer writes a program to store a patient’s temperature every hour for a day.
State the data structure that would be most suitable to use and give the reason for your choice.
Data structure ...................................................................................................................................
Reason ..............................................................................................................................................
......................................................................................................................................................[2]
6 Identify two different selection statements that you can use when writing pseudocode.
1 ........................................................................................................................................................
..........................................................................................................................................................
2 ........................................................................................................................................................
......................................................................................................................................................[2]
Question 9
Question 7 begins on page 10.
Question 10
7 A database, SOFASELECT, was set up to show the prices of suites, sofas and chairs for sale from an online furniture warehouse. Part of the database is shown below.
Brochure Number Number Description Material Colour Price in $ Number of Seats of Pieces
Sofa SF17 2 1 Leather Red 950
Sofa SF19 3 1 Vinyl Black 1,000
Suite SU10 4 3 Velvet Green 1,500
Suite SU23 5 3 Leather Brown 950
Recliner chair RC01 1 1 Leather Cream 600
Chair CH16 1 1 Vinyl Red 250
Recliner sofa RS23 4 1 Leather Cream 1,200
Chair CH10 1 1 Velvet Red 175
Part (e)
Complete the query-by-example grid below to select and show the brochure number, material,
colour and price of all the furniture with 3 or more seats.
Field: Table: Sort: Show: Criteria: or:
Question 12
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.
Why this question appears here
98% assigned-topic match · Databases
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 2210_s16_qp_22.pdf
