9618/32/O/N/23 question 11: worked solution (October/November 2023, paper 32)
Show as plain textHide plain text
Cambridge A2 Level Computer Science 9618 · 20.1 Programming Paradigms Worked solution from the Further Programming Paper 3 Advanced Theory booklet, Part 1 of 2. Q12 9618/32/O/N/23 original Q11 Structured · 9 marks 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 IDEA Facts are written as clauses, and a rule uses AND and NOT to combine them. TOTAL 9 marks Official mark scheme VIDEO ▶ Whole paper Video solution of the whole paper · by TEACHING BY SM. Tap the picture to open it on YouTube.