Worked solution from the Further Programming Paper 3 Advanced Theory booklet, Part 1 of 2.
A caracal is a wild cat, so write a type fact. It has short hair, so write a hair fact. Each ends with a full stop.
type(caracal, wild). hair(caracal, short).
Clause 18 is type(caracal, wild). [1]
Clause 19 is hair(caracal, short). [1]
Only clause 11 has long hair (persian).
Write: Cat = persian [1]
Use the variable in the first place of the type clause.
type(Pet, domestic).
Write: type(Pet, domestic). [1]
Both conditions must be true for the same cat, so join two clauses with a comma (AND).
spots(WildSpotty, yes), type(WildSpotty, wild).
Both clauses use WildSpotty in the correct place [1]
The two clauses are joined with a comma and the goal ends with a full stop [1]
The two clauses may be written in either order.
▶ Whole paper
Video solution of the whole paper · by qiphyedu. 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.