Answer to Question #5686 in Prolog for fariha

Question #5686

Mohd is the father of Nazari. Fatimah is the mother of Nazari. Najmah is the wife of Nazari. Noriah is the mother of Najmah and Sulaiman is the father of Najmah. Nazari and Najmah are the parents of Najib, Nasrun and Nadia.
3) Define prolog rules for the following:

a. sibling

b. sister
c. grandmother
d. grandfather

4) Do query on
a) Who are the grandpas’ of Najib? (10 marks)
b) Who are the grandmas of Nasrun? (10 marks)
c) Who are the siblings of Nadia? (10 marks)
d) Who is the sister of Najib? (5 marks)
e) Who are the parents of Najmah? (10 marks)
f) Who is the mother of Nadia? (5 marks)
g) Who is the father of Najmah? (5 marks)
h) Who is the grandpa of Najmah? (5 marks)
i) Who is the mother of Nazari? (5 marks)
j) Who is the father of Nasrun? (5 marks)

?- sibling(najib,X).
X = najib ;
X = nasrun .
Expert's answer
Dear Fariha
Unfortunately, your question requires a lot of work and cannot be done for free.
Submit it with all requirements as an assignment to our control panel and we'll assist you.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

New on Blog