Question: Step 1 : Define the three relations using Relation ( ) Step 2 : Construct all the listed facts for each relation defined in Step
Step : Define the three relations using Relation
Step : Construct all the listed facts for each relation defined in Step using the fact
Step : Define a method, foodflavorx ythat takes two parameters the first parameter for
flavor and the second for food type, and should return all the foods with the same flavor.
Step : Define a method, dishtolikeperson what
that takes two parameters a person's name and a parameter for what food the person likes
and returns what other options of food are recommended for that person.
Note: dishtolike method will calls foodflavor method
You need to define all variables using var and you need conde, run, and llal
methods.
EMAI: Programming for AI
Sample output:
When running the code based on the following print statement:
Output Sample :
printSince Noor has liked Sausage, shehe would like:", run what,
dishtolikeNoor what
Output Sample :
printSince Dmitry has liked cookie, shehe would like:", run what,
dishtolikeDmitry what
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
