Below is the program for Prediction of COVID using Prolog


There are three-part in this Prolog program
1. COVID  Symptoms 
2. COVID Prevention
3. COVID Treatment

%Rule and fact for symptoms(Remove this line to run without any erorr)
serious_symptoms(shortness_of_breath).
serious_symptoms(pain_in_chest).
serious_symptoms(loss_of_movement).
serious_symptoms(loss_of_speech).

most_common_symptoms(dry_cough).
most_common_symptoms(tiredness).
most_common_symptoms(fever).

less_common_symptoms(aches).
less_common_symptoms(pain).
less_common_symptoms(sore_throat).
less_common_symptoms(diarrhoea).
less_common_symptoms(conjjunctivitis).
less_common_symptoms(headache).
less_common_symptoms(loss_of_taste).
less_common_symptoms(rash_on_skin).
less_common_symptoms(discolouration_of_fingers).
less_common_symptoms(discolouration_of_toes).


serious_covid(X,Y,Z):-serious_symptoms(X),
      serious_symptoms(Y), 
      serious_symptoms(Z).

serious_covid(X,Y):-serious_symptoms(X),
     serious_symptoms(Y).


mild_covid(X,Y):-most_common_symptoms(X), 
most_common_symptoms(Y).

mild_covid(X,Y,Z):-most_common_symptoms(X), 
most_common_symptoms(Y), 
most_common_symptoms(Z).


covid_test_required(X,Y,Z):-less_common_symptoms(X),
less_common_symptoms(Y),
less_common_symptoms(Z).


%Rule_and_fact_for_prevention(Remove this line to run without any erorr)
prevention(clean_your_hands).
prevention(use_hand_sanitizer).
prevention(wear_a_mask).
prevention(dont_touch_face).
prevention(stay_home).
prevention(seek_medical_attention_if_required).
prevention(cover_nose_and_mouth).


prevention_check(X,Y,Z):-prevention(X),prevention(Y);
prevention(Y),prevention(Z);
prevention(Z),prevention(X).

%Rule_and_fact_for_treatment(Remove this line to run without any erorr)
treatment(take_rest).
treatment(drink_plenty_water).
treatment(eat_nutritious_food).
treatment(stay_separated).
treatme(clean_and_disinfect_surfaces).

treatments_check(X,Y,Z):-treatment(X),treatment(Y);
treatment(Y),treatment(Z);
treatment(Z),treatment(X).

To run this program refer below screenshots:


Program for prediction of COVID in Prolog 


Program for prediction of COVID in Prolog 

Program for prediction of COVID in Prolog 