Computer Science · May / June 2021 · Paper 21 · Question 5
0478
As printed in the paper
The question as text
The flowchart represents an algorithm. The algorithm will terminate if –1 is entered. START INPUT Value END OUTPUT "Accept: Normal" OUTPUT "Accept: Extreme" Diff1 100 – Value Diff2 Value – 50 No IS Diff1 < 1 OR Diff2 < 1 ? IS Value = –1 ? OUTPUT "Reject: Abnormal" No No Yes Yes Yes IS Value >= 50 AND Value <= 100 ?
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
5(a)[4]
One mark for each correct column (Max 4)
Value
Diff1
Diff2
OUTPUT
50
50
0
Accept: Extreme
75
25
25
Accept: Normal
99
1
49
Accept: Normal
28
Reject: Abnormal
82
18
32
Accept: Normal
150
Reject: Abnormal
–1
5(b)[2]
One mark per bullet point (Max 2)
To output the type of test data… by performing a range check //… by checking if numbers are within the range 50 and 100 (inclusive) (or not).
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

