Past-paper question · 2012 October-November · Paper 32 · Q9(c)

Question 9(c) 2012 · October-November · Paper 32 · 3 marks

Original past-paper question for 9(C)
Original past-paper question for 9(C)
Reveal official mark-scheme answer Official mark-scheme answer for 9(C)

Official answer for Question 9

Part (c)

Part (c)

In_same_continent(Country1, Country2)

✓
IF country(Country1,X) AND country(Country2,X)
✓
Mark as follows:
✓
country clause used twice
[1]
✓
AND operator between two country clauses
✓
(must be caps)
[1]
✓
variables Country1 and Country2
✓
(must be caps)
[1]
✓
Use of a common new variable e.g. X
[1]
✓
[MAX 3]
✓
[Total: 6]

Mark scheme 9691_w12_ms_32.pdf →

Show text version of question

Question 9

Part (c)

Question 9

A declarative programming language is to be used to represent the knowledge base shown For

below: Examiner's Use

1. continent(asia). 2. continent(north_america). 3. continent(australasia). 4. country(india, asia). 5. country(china, asia). 6. country(usa, north_america). 7. country(australia, australasia). 8. state(queensland, australia). 9. state(tasmania, australia). 10. state(texas, usa). 11. state(alaska, usa).

These clauses have the following meaning:

Clause Explanation 1 There is a continent named asia 4 The country india is in asia 9 There is a state in australia named tasmania

Part (c)

Complete the rule below to determine if two countries are in the same continent.

in_same_continent(Country1, Country2)

IF

[3]

reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the publisher will be pleased to make amends at the earliest possible opportunity.

University of Cambridge International Examinations is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge.

Topic relevance

Why this question appears here

71% assigned-topic match · Programming › Constructs

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 9691_w12_qp_32.pdf

Keep practising this topic