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.
- (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]
- (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]
- (c)(i)Write the goal, using the variable Pet, to find all the domestic cats.[1]
- (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.
- [2] 2(a) type(caracal, wild). hair(caracal, short).
- [1] 2(b) persian
- [1] 2(c)(i) type(Pet, domestic).
- [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 →