Question: Nrite a simple Prolog program (using what we already studied) to express the following (use the inipping tool to show results): 1. A binary teach
Nrite a simple Prolog program (using what we already studied) to express the following (use the inipping tool to show results): 1. A binary "teach" relation, for two teachers and 10 students (write it such that there are those who teach and are also students). The program should include one rule: 1 . define the property "student"; 2. to define the property "teacher". 2. Write a query to return the name of at least one student (may get repeated instances). 3. Write a query to return the name of at least one teacher student (may get repeated instances). 4. Write a query to return the name of at least one person who is both students and a teacher (same as above)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
