Computers and Technology

1. Assuming the parent relation as defined in the following piece of Prolog code, what will be Prolog's answers to the following questions?
parent (pam, bob).
parent (tom, bob).
parent (tom, liz).
parent (bob, ann).
parent (bob, pat).
parent (pat, jim).
a) ?- parent (jim, x).
b) ?- parent (X, jim).
c) ?- parent (pam, X),parent (X, pat).
d) ?- parent (pam, X), parent (X, Y), parent (Y, jim).
2. Formulate in Prolog the following questions about the parent relation:
a) Who is Pat's parent?
b) Does Liz have a child?
c) Who is Pat's grandparent?

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 19:30, kprincess16r
Why is it a good idea to leave an interview being courteous and polite?
Answers: 1
image
Computers and Technology, 22.06.2019 19:00, trintrin227
In he example code, what does the title attribute create? a tool tip an element a source a markup
Answers: 1
image
Computers and Technology, 23.06.2019 06:30, jayjay5246
Which option correctly describes a dbms application? a. software used to manage databases b. software used to organize files and folders c. software used to develop specialized images d. software used to create effective presentations
Answers: 1
image
Computers and Technology, 23.06.2019 07:00, MissSmartyPants88
To produce a starlight effect in her photograph, lina should choose the filter for her camera.
Answers: 1
Do you know the correct answer?
1. Assuming the parent relation as defined in the following piece of Prolog code, what will be Prol...

Questions in other subjects: