subject

Family Given are some facts in the following form.

male(jack).
male(oliver).
male(ali).
male(james).
male(simon).
male(harry).
female(helen).
female(sophie).
female(jess).
female(lily).
parent(jack, jess).
parent(jack, lily).
parent(helen, jess).
parent(helen, lily).
parent(oliver, james).
parent(sophie, james).
parent(jess, simon).
parent(ali, simon).
parent(lily, harry).
parent(james, harry).

where male/1 and female/1 state the gender of a person, and parent/2 means that the first argument is a parent of the second (in this case Jack is a parent of Jess).

Write the following predicates:
• mother/2
• father/2
• grandmother/2
• grandfather/2
• ancestor/2

Example execution:

?- father(ali, X)
X = simon

?- grandfather(jack, X).
X = simon
X = harry

?- ancestor(X, Y).
X = jack, Y = jess
X = jack, Y = lily
X = helen, Y = jess

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 02:10, ttangelique
Which sentences describe the things you need to ensure while creating a sketch and a drawing? while an artistic or creative drawing is a creative expression, a technical drawing is an informative expression. you need to create accurate and neat drawings to convey accurate information. a technical drawing clearly conveys its meaning or information, and does not leave room for interpretation maintain a good speed while creating drawings
Answers: 1
image
Computers and Technology, 24.06.2019 16:00, achsahjosey
This isn't about school but every time it tells me to watch an ad to unlock the answer to a question it prompts a survey and it just keeps loading. so i haven't been able to get answers for my tests in like a week.
Answers: 2
image
Computers and Technology, 25.06.2019 06:20, joe7977
If you want to change the speed of a layer's horizontal scrolling, what should you change? a. the x coefficient b. the y coefficient c. the virtual width d. the order of the game's layers select the best answer from the choices provided
Answers: 2
image
Computers and Technology, 26.06.2019 03:20, jackieeecx3
What is the role of the constructor for an object?
Answers: 1