Algorithm design and problem-solving – O Level Computer Science (2210)

137 questions · page 10 of 10

0 / 0Answer a question to start your score.
Quick quiz (10)Saved 0
Advertisement
136
2210/22/M/J/16 · Question 3May/June 2016Paper 224 marks
Loading question…
Question text

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.
A value of –1 for the height stops the input.
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
[4]

137
2210/22/M/J/16 · Question 6May/June 2016Paper 222 marks
Loading question…
Question text

6
Identify two different selection statements that you can use when writing pseudocode.
1 …
…
2 …
… [2]
Question 7 begins on page 10.

Advertisement