Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Pdf
1. Visual Prolog (Lab)
Represent the following in Prolog:
• Ali is Dancer.
dancer(ali).
• Mohamed is a doctor .
doctor(mohamed).
• Rami is a student .
student(rami).
• Lolo is a vet .
vet(lolo).
• Lolo and rami are married .
married(lolo,rami).
• Sawsan loves everyone who is a good dancer
Loves(sawsan,Every_one):- good_dancer(Every_one).
• Lolo eats anything that is nutritious or tasty.
eat(lolo,Any_thing):- nurtitious(Any_thing);tasty(Any_thing).
2. Represent the following Knowledge Base in
Prolog:
– in This Uni we Have the Following Students :
• Rami is a student he is 21 age from Aleppo his Id is 10.
• Samer is a student he is 19 age from Homs his Id is 11.
• John is a student he is 20 age from Damascus his Id is 12
• Lolo is a student he is 20 age from Damascus his Id is 13
- In this uni we have the following Course:
• Mohamed Teach Nlp, Nlp Id Is C1.
• Ahamed Teach Image-proc, Image-Proc Id Is C2.
• Peter Teach Artificial-Intell, Artificial-Intell Id Is C3.
–At the final Exam we have the following Mark :
Student ID Course ID Mark
10 C1 67
10 C2 59
10 C3 80
11 C2 52
11 C3 49
12 C2 56
12 C3 54
13 C1 72
13 C2 65
13 C3 68
4. Formulate queries to retrieve the following
information from the previous Knowledge Base,
using anonymous variables to replace unnecessarily
named variables:
• What is the name of the student who comes from Damascus?
• What mark did rami get in course c3?
• What mark did lolo get in NLP?
Output:
Asmaa Almalki