May/June 2026 Paper 31

2026 · 11 questions · 28 parts · 75 marks

0/75 marks
0Correct0Partial0Wrong28Unattempted
Filters0 active

Questions

Select a part to jump to its question

Finish set
11(a)Programming ParadigmsEasy3 marks
A declarative programming language is used to show which home cinema devices customers already have and which devices they want.
pseudocode
01 device(projector).02 device(large_tv).03 device(medium_tv).04 device(bluray_player).05 device(amplifier).06 device(media_player).07 device(main_speakers).08 device(centre_speaker).09 device(surround_speakers).10 customer(petrov).11 customer(margaret).12 customer(steffan).13 customer(susan).14 customer(allan).15 customer(sammy).16 owns(projector, petrov).17 owns(media_player, petrov).18 owns(projector, susan).19 owns(projector, sammy).20 owns(media_player, allan).21 owns(bluray_player, steffan).22 wants(main_speakers, margaret).23 wants(surround_speakers, susan).24 wants(medium_tv, steffan).
These facts (clauses) have the meanings:
factmeaning
01A projector is a device.
10Petrov is a customer.
16Petrov owns a projector.
22Margaret wants main speakers.
Betty is a customer who owns a large TV and wants a Blu-ray player. Write additional facts to represent this information.

Answer

0 words
11(b)Programming ParadigmsEasy1 mark
Using the variable Owner, the goal:
pseudocode
owns(media_player, Owner)
returns
pseudocode
Owner = petrov, allan
Select every customer returned by using the goal:
pseudocode
owns(projector, Owner)
Owns a projector
11(c)Programming ParadigmsMedium4 marks
D may be available for A to buy if D is a device and A is a customer and A does not own that device. Write this as a rule:
pseudocode
may_buy_device(D, A)IF 

Answer

0 words