Prolog Code
Prolog Code
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).