Question: Need help on a Prolog programming language question. Please see Prolog program to help assist. Prolog program: D) The query?- all_pets_in_danger (Listof Pets).' returns 'L

Need help on a Prolog programming language question. Please see Prolog program to help assist.  Need help on a Prolog programming language question. Please see Prolog
Prolog program:
program to help assist. Prolog program: D) The query"?- all_pets_in_danger (Listof Pets).'
returns 'L = [tabitha, tabitha, tabitha, tabitha, tabitha, tabitha, tabitha, tabitha, sherrylinda).'

D) The query"?- all_pets_in_danger (Listof Pets).' returns 'L = [tabitha, tabitha, tabitha, tabitha, tabitha, tabitha, tabitha, tabitha, sherrylinda).' There are 2 bugs here: 1. There should not be so many duplicates of 'tabitha' DI) What do you think is making it so in the code? How you would fix it? 2. 'blacky' should be part of the list D2) What is the bug in the code that prevents 'blacky' from appearing in the list? person (lauren). person (hugo). person (esther). person (nadeleine). person (anselme). person (genevieve). person (jean). chicken (blacky). chicken (hoper) chicken (twinkle). chicken (night). chicken (sherryLinda). cat (tabitha). age (lauren, 37). age (hugo. 37). age (jean, 12). age (genevieve, 10). age (esther, 7). age (anselme, $). age (madeleine, 2) age (blacky, 1). age (hoper, 1). age (twinkle, 1). age (night, 1). age (SherryLinda,1). age (tabitha, 5). own (esther, twinkle). own (madeleine blacky). own (anselne, sherryLinda). own (genevieve, night) own (jean, hoper). own (L tabitha). :- logical (X) person (X) age (X,A), A> 6. baby (X) person (X). age (X,A), A

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!