Prolog Family tree
- by Tania
Hi I have a Question in prolog ,
I did it but its not showing answers When i ask about the brothers,sisters,uncles,aunts
This is what I wrote, what's wrong ?
/*uncle(X, Y) :– male(X), sibling(X, Z), parent(Z, Y).*/
/*uncle(X, Y) :– male(X), spouse(X, W), sibling(W, Z), parent(Z, Y).*/
uncle(X,Y) :-
parent(Z,Y), brother(X,Z).
aunt(X,Y) :-
…