

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


1
'It is summer'.
'It is cold' :- 'It is winter', 'It is snowing'.
3
parentof(ogden, bruce).
siblingof(X,Y) :- parentof(Z,Y), X != Y.parentof(Z,X),
brotherof(X,Y) :- X != Y.parentof(Z,Y),male(X),parentof(Z,X),
? – parentof(amy, Y).
? – parentof(X, anthony).
? – siblingof(X, Y).
? – siblingof(johnette, Y).
? – siblingof(johnette, bruce).
Variables: must begin with an upper case letter.
single quotes.Constants: numbers, begin with lowercase letter, or enclosed in
5
Cost is ItemCost + CostOfRest.total_cost(Rest, CostOfRest),cost(Item, ItemCost),total_cost([Item|Rest], Cost) :-
7