Question 1 Report
A sports centre writes a program to award points in a step challenge. Fig. 1 shows the calculation. The user enters a daily step number. The first 5000 steps earn no points. Each step above 5000 earns one point, but the daily points cap is 10000. The program is tested with values around both decision boundaries before the code is placed in the fitness app.
(a) Identify the points for 5000 steps. [1]
(b) Write the points for 6200 steps. [1]
(c) State the points for 17000 steps. [1]
(d) Give one test value for the point at which the cap is first applied. [1]
(e) Use the figure to identify the maximum possible output. [1]
(a) 5000 steps meets steps <= 5000, so the output is 0 points. [1]
(b) Since 6200 is above 5000:
\[6200-5000=1200\]
The output is 1200 points. [1]
(c) For 17000 steps, the initial calculation is \(17000-5000=12000\). Since this exceeds the cap, the output is set to 10000 points. [1]
(d) The cap is first applied at 15001 steps. [1] At 15000 steps, the calculated points are exactly 10000; the condition is strictly points > 10000.
(e) The maximum possible output is 10000 points. [1]
Everything you need to excel in your exams