Please construct a Prolog program to solve the problem Grantville\'s local libra
ID: 3697870 • Letter: P
Question
Please construct a Prolog program to solve the problem
Grantville's local library recently sponsored a writing contest for young children in the community. Each of four contestants (including Ralph) took on the task of bringing to life an imaginary friend in a short story. Each child selected a different type of animal (including a moose) to personify, and each described a differ- The seal (who isn't the creation of either Joanne or Lou) neither rode to the moon in a spaceship nor took a trip around the world on a magic train. Joanne's imaginary friend (who isn't the grizzly bear) went to the circus. Winnie's imaginary friend is a zebra. The grizzly bear didn't board the spaceship to the moon adventure involving this new friend (one story described how an imaginary friend had formed a rock band). From the following clues, can you match each young author with his or her imaginary friend and determine the adventure the two had together?Explanation / Answer
Joanne and Circus are related by 2.
Winnie and Zebra are related by 3.
Since the bear did not took spaceshit to moon, and the seal also has the same thing. We can conclude that Winnie-Zebra-Trip to Moon are related.
Similarly it is easy to conclude that the Lou, Bear and Trains are related.
The seal does not belong to Joanne, or Winnie or Lou, hence it belongs to Ralph. So the final Logic Puzzles are:
1.Joanne - Moose - Circus
2. Lou - Bear - Train around the world
3. Winnie - Zebra - trip to the moon
4.Ralph - Seal - Rock band
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.