Cambridge AS Level Computer Science 9618 · 9.1 Computational Thinking Skills

Q5 · 9618/23/O/N/22 Q2

Worked solution from the Algorithm Design and Problem-solving Paper 2 Problem-solving and Programming booklet, Part 1 of 2.

Q59618/23/O/N/22original Q2Structured · 3 marks
Question 2 from 9618/23/O/N/22

Worked solution

Write three modules, each with its name and a short use. For example:

SelectCharity() allows the user to choose a charity. [1]

SpecifyAmountAndType() lets the user enter an amount and choose a single or regular payment. [1]

MakePayment() (or ValidatePayment()) takes the payment for the charity, after the payment details are checked. [1]

Other correct modules include AddBankAccountDetails() and AddDonorDetails().

KEY IDEADecomposition splits a big problem into small named modules, each with one clear job.
TOTAL 3 marks

Official mark scheme

Mark scheme for 9618/23/O/N/22 question 2
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.