Cambridge A2 Level Computer Science 9618 · 20.1 Programming Paradigms

Q12 · 9618/32/O/N/23 Q11

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

Q129618/32/O/N/23original Q11Structured · 9 marks
Question 11 from 9618/32/O/N/23

Worked solution

(a)

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]

(b)

Find enjoys facts with climbing: clauses 14 and 15.

Write: P = toby, nina [1]

(c)

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.

KEY IDEAFacts are written as clauses, and a rule uses AND and NOT to combine them.
TOTAL 9 marks

Official mark scheme

Mark scheme for 9618/32/O/N/23 question 11
VIDEO
▶ 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.