These exercises are presented in the form of a partial sample exam.
They cover the material lectured by Bill Wilson.
They only cover the extension material. You should also
refer to the
COMP9414 sample exam.
See also the exam cover sheet - linked on the class lecture notes page.
assert and asserta.
?- functor(owns(jim, book(author(joanna, rowling),
title("Harry Potter and the Half-Blood Prince"))),
FuncName,
Arity).
likes(mary, pizza).
likes(mary, curry).
likes(john, beer).
likes(john, pizza).
is_liked(X) :- likes(_, X).
what is the output of the following queries??- setof(X, is_liked(X), List1).
?- findall(X, likes(_, X), List2).
Solutions (when and if available)
CRICOS Provider Code No. 00098G