Worked solution from the Algorithm design and problem-solving Paper 2 Algorithms, Programming and Logic booklet, Part 6 of 8.
Take each pair of inputs in turn. Difference = PointsWon - PointsLost. 1000 or more gives move up, below 0 gives move down, anything else gives keep on trying. A PointsWon of -1 ends the flowchart.
| PointsWon | PointsLost | Difference | OUTPUT |
|---|---|---|---|
| 5000 | 4474 | 526 | Keep on trying |
| 6055 | 2000 | 4055 | Well done move up |
| 7900 | 9800 | -1900 | Sorry move down |
| 3000 | 2150 | 850 | Keep on trying |
| -1 | 6700 |
PointsWon and PointsLost inputs correct [1]
Difference calculations correct [1]
OUTPUT messages correct [1]
Add an extra decision box before the check for Difference >= 1000. [1]
It checks if the difference is greater than 5000. (Or change the 1000 test to >= 1000 and <= 5000.) [1]
If yes, add a new output box 'Fantastic leap up two levels' before the flow line returns to the input. [1]
▶ Whole paper
Video solution of the whole paper · by Zafar Ali Khan (ZAK). Tap the picture to open it on YouTube.
Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.