Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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).

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at drjack9650@gmail.com
Chat Now And Get Quote