PROLOG PROGRAM: ----------------------------------------------------------------
ID: 3873625 • Letter: P
Question
PROLOG PROGRAM:
--------------------------------------------------------------------
Given the following set of Prolog clauses"
father(X,Y):-parent(X,Y),male(X).
parent(sally,bob). parent(jim,bob). parent(alice,jane). parent(thomas,jane).
male(bob). male(jim). male(thomas).
female(sally). female(alice).
--------------------------------------------------------------------
(1) Add a rule that states parent bill had only sons (no daughters) and every such son became a parent of a child named frank, walkter, or george.
-provide screen shot of final results
-what is the rule you added for above?
--------------------------------------------------------------------
Explanation / Answer
Below is the rule for : parent bill had only sons (no daughters) and every such son became a parent of a child named frank, walkter, or george.
parent(bob,X):-male(X),parent(X,Y),(Y=frank; Y=walkter; Y=george).
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.