Cambridge AS Level Computer Science 9618 · 9.1 Computational Thinking Skills

Q2 · 9618/21/M/J/22 Q3

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

Q29618/21/M/J/22original Q3Structured · 4 marks
Question 3 from 9618/21/M/J/22

Worked solution

(a)

Write three different sub-problems the cinema program has to solve. Any three of these:

Search for films: the user types a film name and the module finds the screening [1]

Search for available seats on a screen for that film [1]

Calculate the cost of a booking [1]

Also accepted: book a given number of seats for a screening.

(b)

Write: a function (it returns a value; a procedure does not) [1]

KEY IDEADecomposition splits a big task into small modules; a function returns a value.
TOTAL 4 marks

Official mark scheme

Mark scheme for 9618/21/M/J/22 question 3
VIDEO
▶ Whole paper

Video solution of the whole paper · by CS BY AQIB KHAN. 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.