Past-paper question · 2016 May-June · Paper 42 · Q4(d)

Question 4(d) 2016 · May-June · Paper 42 · 1 mark

Original past-paper question for 4(D)
Original past-paper question for 4(D)
Original past-paper question for 4(D)
Original past-paper question for 4(D)
Reveal official mark-scheme answer Official mark-scheme answer for 4(D)

Official answer for Question 4

Part (d)

✓
[ ] 1

Mark scheme 9608_s16_ms_42.pdf →

Show text version of question

Question 4

Part (d)

Question 4

When a car reaches a certain age, a safety assessment has to be carried out. A car’s brakes and

tyres must be tested. The tyre test result and the brakes test result for each car are recorded. If the car passes the assessment, a safety certificate is issued.

Cars have a unique three-character registration.

The following knowledge base is used:

01 car(a05). 02 car(h04). 03 car(a03). 04 car(h07). 05 car(a23). 06 car(p05). 07 car(b04). 08 carRegYear(a05, 2015). 09 carRegYear(h04, 2013). 10 carRegYear(a03, 2008). 11 carRegYear(h07, 2011). 12 carRegYear(a23, 2008). 13 carRegYear(p05, 2014). 14 carRegYear(b04, 2014). 15 testBrakes(h07, pass). 16 testTyres(h07, fail). 17 testBrakes(a03, fail). 18 testTyres(a03, fail). 19 testBrakes(a23, pass). 20 testTyres(a23, pass). 21 carAssessmentDue if carRegYear(Car, RegYear) and RegYear <= DeadlineYear. 22 issueCertificate(Car) if testTyres(Car, Result) and testBrakes(Car, Result) and Result = pass.

Part (d)

The predicate conCatCompare is defined as a rule and returns TRUE or FALSE as follows:

conCatCompare(X, Y, Z)

Concatenates the lists X and Y and compares the new list with list Z.

If equal, the clause evaluates to TRUE, otherwise FALSE.

Consider the clause:

conCatCompare(X, Y, [a7,b6,c4])

If:

  • the clause evaluates to TRUE
  • and Y represents the list [a7, b6, c4]

State the value of X.

X = .................................................................................................................................[1]

Question 11

Topic relevance

Why this question appears here

71% assigned-topic match · Hardware › Logic gates and logic circuits

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_s16_qp_42.pdf

Keep practising this topic