Question 2(d) 2018 · May-June · Paper 42 · 3 marks
Reveal official mark-scheme answer
Official answer for Question 2
Part (d)
Question 1
mark for each bullet to max 3
Question 3
Show text version of question
Question 2
Part (d)
Question 2
A declarative language is used to represent the following facts and rules about iguanas and
lizards.
01 has(reptile, cold_blood). 02 has(reptile, air_breathing). 03 has(reptile, scales). 04 05 is_a(squamata, reptile). 06 is_a(iguana, squamata). 07 is_a(lizard, squamata). 08 is_a(green_iguana, iguana). 09 is_a(cayman, iguana). 10 is_a(smooth_iguana, iguana).
Question 11
12 maxsize(green_iguana, 152). 13 maxsize(cayman, 90). 14 maxsize(smooth_iguana, 70).
These clauses have the following meaning:
Clause Explanation 01 A reptile has cold blood. 09 A cayman is a type of iguana. 12 The maximum size of a green iguana is 152 cm.
Part (d)
All iguanas and lizards are squamata. All squamata are reptiles.
Write a recursive rule to make all lizards and iguanas inherit the properties of reptiles.
has(X, Y)
IF
...................................................................................................................................................
...............................................................................................................................................[3]
Why this question appears here
98% assigned-topic match · Computational thinking and problem-solving › Recursion
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9608_s18_qp_42.pdf
