Cambridge A2 Level Computer Science 9618 · 20.1 Programming Paradigms

Q13 · 9618/31/M/J/24 Q8

Worked solution from the Further Programming Paper 3 Advanced Theory booklet, Part 1 of 2.

Q139618/31/M/J/24original Q8Structured · 8 marks
Question 8 from 9618/31/M/J/24

Worked solution

(a)

Sliding doors is a feature, it is available on a minivan and unavailable on a hatchback.

23 feature(sliding_doors).
24 available(sliding_doors, minivan).
25 unavailable(sliding_doors, hatchback).

feature(sliding_doors) [1]

available(sliding_doors, minivan) [1]

unavailable(sliding_doors, hatchback) [1]

(b)

Look for available facts ending in hatchback: clauses 15 and 17.

Write: Options = sunroof, reversing_camera [1]

(c)

F must be a feature, B a body style and F must not be unavailable for B.

may_choose_option(F, B) IF feature(F) AND bodystyle(B) AND NOT unavailable(F, B)

feature(F) [1]

bodystyle(B) [1]

NOT unavailable(F, B) [1]

All operators and punctuation correct (a comma is allowed for AND), with no extra lines [1]

KEY IDEAWrite facts as clauses, and build a rule from facts joined with AND and NOT.
TOTAL 8 marks

Official mark scheme

Mark scheme for 9618/31/M/J/24 question 8
VIDEO
▶ Starts at Q8 (54:18)

Starts at Q8 (54:18) · by Pseudocode Pro. 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.