Computer Science (AS & A Level) · Oct / Nov 2022 · Paper 23 · Question 6
9618
As printed in the paper
The question as text
Components are weighed during manufacture. Weights are measured to the nearest whole gram. Components that weigh at least 3 grams more than the maximum weight, or at least 3 grams less than the minimum weight, are rejected. A component is rechecked if it weighs within 2 grams of either the maximum or minimum weight. The final outcome of weighing each component is shown below: Outcome Weight Reject Reject Recheck Maximum weight Max + 2 Max – 2 Max Recheck Accept Min + 2 Min – 2 Min Minimum weight A function Status() will be called with three parameters. These are integers representing the weight of an individual component together with the minimum and maximum weights. The value returned from the function will be as follows: Outcome Return value Accept 'A' Reject 'R' Recheck 'C'
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
6(a)[5]
6(b)[6]
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

