Worked solution from the Further Programming Paper 3 Advanced Theory booklet, Part 1 of 2.
Carlos needs facts that he is a person, cycling is a hobby, he enjoys cycling and he dislikes music.
20 person(carlos). 21 hobby(cycling). 22 enjoys(carlos, cycling). 23 dislikes(carlos, music).
person(carlos) [1]
hobby(cycling) [1]
enjoys(carlos, cycling) [1]
dislikes(carlos, music) [1]
Find enjoys facts with climbing: clauses 14 and 15.
Write: P = toby, nina [1]
N must be a person, H a hobby and N must not dislike H.
might_enjoy(N, H) IF person(N) AND hobby(H) AND NOT dislikes(N, H)
person(N) [1]
hobby(H) [1]
NOT dislikes(N, H) [1]
All operators correct, with no extra code [1]
Commas may be used instead of AND, in any order.
▶ Whole paper
Video solution of the whole paper · by TEACHING BY SM. 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.