Cambridge O Level Computer Science 2210 · 7.7 Trace tables

Q46 · 2210/22/M/J/20 Q4

Worked solution from the Algorithm design and problem-solving Paper 2 Algorithms, Programming and Logic booklet, Part 6 of 8.

Q462210/22/M/J/20original Q4Structured · 6 marks
Question 4 from 2210/22/M/J/20

Worked solution

(a)

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.

PointsWonPointsLostDifferenceOUTPUT
50004474526Keep on trying
605520004055Well done move up
79009800-1900Sorry move down
30002150850Keep on trying
-16700

PointsWon and PointsLost inputs correct [1]

Difference calculations correct [1]

OUTPUT messages correct [1]

(b)

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]

KEY IDEAA new case in a flowchart needs a new decision box placed so the tests are made in the right order.
TOTAL 6 marks

Official mark scheme

Mark scheme for 2210/22/M/J/20 question 4
VIDEO
▶ 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.