Question
Please write the code in Prolog!! a) Create a file name_surname.pl, and define facts and rules consisting of at least 20 lines. These can include
Please write the code in Prolog!!
a) Create a file name_surname.pl, and define facts and rules consisting of at least 20 lines. These can include patient, companion, doctor, nurse, examines, operates, laborant, checks, measures etc. and other relationships that you can think of in a hospital setting. Make sure, you have both facts and rules (implications). Also dont forget to put . after each fact or rule.
b) Ask 5 interesting queries.
Make sure some of these queries involve variables. You can include these queries inside name_surname.pl as multiline comments. Also paste the answers you get from those queries.
Include the answers of these queries. Make sure you include all possible answers. (You need to type ; after each answer to get the complete list. )
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started