Question 8(c) 2016 · May-June · Paper 22 · 19 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 (c)
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 (c)
State the data type you would choose for each of the following fields.
Number of Seats .....................................................................................................................
Price in $ ..............................................................................................................................[2]
Question 11
Why this question appears here
98% assigned-topic match · Algorithm design and problem-solving
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
