Cambridge O Level Computer Science 2210 · 7.8 Identifying and correcting errors in algorithms

Q75 · 2210/23/O/N/24 Q9

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

Q752210/23/O/N/24original Q9Structured · 4 marks
Question 9 from 2210/23/O/N/24

Worked solution

Check each box and arrow against what the flowchart should do. Four errors:

Error 1: the Yes and No labels on the first decision (Is A = B AND B = C ?) are the wrong way round. Correction: Yes should be No and No should be Yes, because if all three are equal the flowchart should stop [1]

Error 2: the second decision uses OR. Correction: change OR to AND (Is A >= B AND A >= C ?) [1]

Error 3: the box with A → B has the arrow the wrong way round. Correction: write A ← B [1]

Error 4: the box with A ← C and B ← C is drawn as an input/output parallelogram. Correction: it should be a process box (rectangle) [1]

KEY IDEACheck decision labels, logic operators, assignment direction and the symbol shape for each step.
TOTAL 4 marks

Official mark scheme

Mark scheme for 2210/23/O/N/24 question 9
VIDEO
▶ Topic lesson

A lesson on this topic · by Mr Bulmer's Learning Zone. 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.