Skip to main content
A-LevelComputer ScienceFurther programming9618/31 · May/June 2022 · Q26 Marks

A declarative language is used to represent the following facts about cats. 01 type(leopard, wild). 02 type(lion, wild). 03 type(cheetah, wild). 04 type(savannah, hybrid). 05 type(persian, domestic). 06 07 hair(leopard, medium). 08 hair(lion, short). 09 hair(cheetah, medium). 10 hair(savannah, medium). 11 hair(persian, long). 12 13 spots(leopard, yes). 14 spots(lion, no). 15 spots(cheetah, yes). 16 spots(savannah, yes). 17 spots(persian, no). These clauses have the following meaning: Clause Meaning 01 A leopard is a type of wild cat. 08 A lion has short hair. 16 A savannah has spots.

  1. (a)More facts are to be included. A caracal is a wild cat with short hair. Write the additional clauses to record these facts. 18 19[2]
  2. (b)Using the variable Cat, the goal: hair(Cat, medium) returns Cat = leopard, cheetah, savannah Write the result returned by the goal: hair(Cat, long) Cat =[1]
  3. (c)(i)Write the goal, using the variable Pet, to find all the domestic cats.[1]
  4. (c)(ii)Write the goal, using the variable WildSpotty, to find all the wild cats with spots.[2]

Mark scheme

Marking points from the official mark scheme (May/June 2022). The mark or mark type is shown in brackets.

  1. [2] 2(a) type(caracal, wild). hair(caracal, short).
  2. [1] 2(b) persian
  3. [1] 2(c)(i) type(Pet, domestic).
  4. [2] 2(c)(ii) spots(WildSpotty, yes) ,type(WildSpotty, wild).

Write your answer and get it marked

On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.

Sign up free →

About this question

Topic
Further programming, A-Level Computer Science (syllabus 9618). Structured question, 6 marks.
Source
A-Level Computer Science, May/June 2022 Paper 3 Variant 1, question 2.

Questions and mark schemes are from past examination papers and remain the copyright of the exam board. How Oracle Prep builds its content

Related Computer Science questions

© 2026 Oracle Prep