Worked solution from the Further Programming Paper 3 Advanced Theory booklet, Part 1 of 2.
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]
Look for available facts ending in hatchback: clauses 15 and 17.
Write: Options = sunroof, reversing_camera [1]
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]
▶ Whole paper
Video solution of the whole paper · by CsWithMym. 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.