22.5 Key access: Question

Exercise: Key access

Who had access to the key? Well, the key was stolen from Anna either Monday in Copenhagen or Tuesday in Odensee. In addition, Beth had a copy of the key.

Using the yet-to-be-written 'stay/3' predicate, write a predicate which tells us who had access to the key. Write this in three prolog clauses. Use the predicate name 'key_access' and give it one argument.

Hint: Should the information that Beth had access to the key be a fact or a rule?

Answer

Click to see an answer.


Prev: Weapon access
Up: 22 A Murder Mystery
Next: Crime access