2210/21/M/J/25 question 10: worked solution (May/June 2025, paper 21)

Show as plain text

Cambridge O Level Computer Science 2210 · 7.8 Identifying and correcting errors in algorithms Worked solution from the Algorithm design and problem-solving Paper 2 Algorithms, Programming and Logic booklet, Part 7 of 8. Q77 2210/21/M/J/25 original Q10 Structured · 7 marks Worked solution (a) Follow each score through the flowchart. A score of 40 or more takes the first Yes, so it gets C. Only scores below 40 reach the other tests, so they get D. The other tests are never reached for 63 and 91. Score Grade OUTPUT 21 D You achieved a D 46 C You achieved a C 63 C You achieved a C 91 C You achieved a C 12 D You achieved a D Score column correct [1] Grade column correct [1] OUTPUT column correct [1] All three marks can be given if only the first row is correct. (b) The decisions are in the wrong order, so the tests must be reversed. Write these changes: Change the first decision to IS Score >= 80 ? [1] Change the last decision to IS Score >= 40 ? [1] Change the process box after the first decision from Grade ← "C" to Grade ← "A" [1] Change the process box after the last decision from Grade ← "A" to Grade ← "C" [1] Other accepted changes: add a loop (an output asking for a score or -1 to stop, a counter, a decision box with an exit condition and correct arrows). KEY IDEA Tests must go from the highest boundary to the lowest, otherwise a high score is caught by the first, lowest test. TOTAL 7 marks Official mark scheme VIDEO ▶ Topic lesson A lesson on this topic · by Mr Bulmer's Learning Zone. Tap the picture to open it on YouTube.