Rule Defines Prolog Following Sentence Mary Owns Pet Cat Black Spots Owns Mary Pet Cat Pet Q37245725

Which rule defines in Prolog the following sentence: “mary ownsa Pet if it is a cat and it has black spots”

owns(mary, Pet):- cat(Pet), black_spots(Pet).

owns(mary, Pet):- cat(Pet); black_spots(Pet).

mary(owns, Pet):- cat(Pet), black_spots(Pet).

cat(Pet), black_spots(Pet):-owns(mary, Pet).


Answer


An suer

owns(mary, Pet):- cat(Pet), black_spots(Pet).

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.