0% found this document useful (0 votes)
57 views1 page

Prolog Code

The document describes a knowledge base about diseases and their symptoms. It defines facts about jugs being filled at different locations. It then defines symptoms, what constitutes a disease based on symptoms and temperature, and recommended medicines for different diseases.

Uploaded by

Muskan Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views1 page

Prolog Code

The document describes a knowledge base about diseases and their symptoms. It defines facts about jugs being filled at different locations. It then defines symptoms, what constitutes a disease based on symptoms and temperature, and recommended medicines for different diseases.

Uploaded by

Muskan Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

jugfilled(0,0).

jugfilled(4,0):-jugfilled(0,0).
jugfilled(1,3):-jugfilled(4,0).
juffilled(1,0):-jugfilled(1,3).
jugfilled(0,1):-jugfilled(1,0).
jugfilled(4,1):-jugfilled(0,1).
jugfilled(2,3):-jugfilled(4,1).
jugfilled(2,0):-jugfilled(2,3).

temperature(99.0001).
symptom(vomiting).
symptom(jointpain).
symptom(rash).
symptom(headache).
symptom(nausea).
symptom(upsetstomach).
symptom(weight_decrease).
symptom(shortness_of_breadth).
symptom(no_sense_of_taste).
disease(fever):-temperature(X),X>99.
disease(malaria):-
symptom(vomiting),symptom(headache),symptom(upsetstomach),disease(fever).
disease(dengue):-
symptom(vomiting),symptom(headache),symptom(upsetstomach),disease(fever),symptom(jo
intpain),symptom(rash).
disease(covid):-
symptom(shortness_of_breadth),symptom(no_sense_of_taste),disease(fever),symptom(wei
ght_decrease).
disease(tubercolosis):-symptom(vomiting),disease(fever),symptom(weight_decrease).
medicine(paracetamal):-disease(fever).
medicine(zoombieflame):-disease(malaria).
medicine(acetaminophen):-disease(dengue).
medicine(tylenol):-disease(covid).
medicine(pyrazinamide):-disease(tubercolosis).

You might also like