Skip to main content
A-LevelComputer ScienceFurther programming9618/32 · May/June 2022 · Q27 Marks

A declarative language is used to represent the following facts about a school. 01 teaches(alan, mathematics). 02 teaches(ioana, geography). 03 teaches(nina, history). 04 teaches(alan, statistics). 05 06 studies(ahmed, history). 07 studies(freya, history). 08 studies(kim, history). 09 studies(freya, geography). 10 studies(hua, mathematics). 11 studies(hua, statistics). 12 studies(hua, geography) 13 14 tutors(alan, kim). 15 tutors(alan, hua). 16 tutors(alan, freya). 17 tutors(nina, ahmed). These clauses have the following meaning: Clause Meaning 01 Alan teaches mathematics. 06 Ahmed studies history. 14 Alan is Kim's tutor.

  1. (a)More facts are to be included. Sam studies history and Nina is his tutor. Write the additional clauses to record these facts. 18 19[2]
  2. (b)Using the variable Student, the goal: studies (Student, history) returns Student = freya, ahmed, kim Write the result returned by the goal: studies (Student, geography) Student =[1]
  3. (c)Write the goal, using the variable X, to find all the students who have a tutor that teaches them. For example, Hua has Alan for a tutor and is also taught mathematics by Alan.[4]

Mark scheme

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

  1. [2] studies (sam, history). tutors(nina, sam).
  2. [1] freya, hua // hua, freya
  3. [4] one mark for correct use of X one mark for two other variables in correct positions one mark for three correct clauses in any order one mark for correct syntax teaches (R, S), studies (X, S), tutors(R, X).

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, 7 marks.
Source
A-Level Computer Science, May/June 2022 Paper 3 Variant 2, 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