wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Simple AI Symptom Diagnosis Using LISP – Rule-Based Expert System

profile
Sejal Jethwa
Jul 16, 2025
1 Like
0 Discussions
0 Reads

(defun diagnosis ()

(format t "%Welcome to AI Symptom Checker!%")

(format t "Please enter your symptoms (e.g., fever, cough, headache).~%")

(format t "Type 'exit' to quit.~%")


(loop

(format t "~%Your Symptoms: ")

(force-output) ;; Force flush to display prompt before input

(let* ((input (read-line))

(symptoms (string-downcase input))) ;; Normalize input to lowercase

(cond

((string= symptoms "exit")

(format t "Goodbye! Take care.~%")

(return))

((and (search "fever" symptoms)

(search "cough" symptoms)

(search "body pain" symptoms))

(format t "Diagnosis: You may have the flu.~%"))


((and (search "fever" symptoms)

(search "headache" symptoms))

(format t "Diagnosis: You may have a viral fever.~%"))


((and (search "cough" symptoms)

(search "sore throat" symptoms))

(format t "Diagnosis: You may have a common cold.~%"))


((and (search "sneezing" symptoms)

(search "itchy eyes" symptoms))

(format t "Diagnosis: You may have an allergy.~%"))

((search "headache" symptoms)

(format t "Diagnosis: You might be dehydrated or stressed.~%"))


((search "fever" symptoms)

(format t "Diagnosis: You may be experiencing a mild fever or infection.~%"))


((search "cough" symptoms)

(format t "Diagnosis: You might have a throat infection or irritation.~%"))


(t

(format t "Diagnosis: Symptoms unclear. Please consult a doctor.~%"))))))


(diagnosis)


Comments ()


Sign in

Read Next

Simple STEM Activities for Toddlers That Spark Curiosity

Blog banner

Memory hierarchy

Blog banner

Cyber Security in Data Breaching

Blog banner

Elements and Principles of Photography

Blog banner

Cloud Security: Trends and Innovations

Blog banner

A book review

Blog banner

Article on IT development trends

Blog banner

The functions of operating system

Blog banner

Multithreading in Operating System

Blog banner

Spitting Pink in the Sink: Why Your Gums Randomly Bleed

Blog banner

Answer

Blog banner

PHONE TECHNOLOGY

Blog banner

ProofHub

Blog banner

Deadlock and starvation

Blog banner

File system

Blog banner

Importance of internet

Blog banner

Life of an army person

Blog banner

File management

Blog banner

How Cyber Forensics use in AI

Blog banner

Rules and Regulations of Networking: "Standards and Protocols" - Part 1

Blog banner

The Role of Summer Camps in Early Childhood Development

Blog banner

How Much Protein Do You Really Need Every Day?

Blog banner

Types Of scheduling

Blog banner

Kafka - A Framework

Blog banner

Benefits of yoga and meditation

Blog banner

How to lose belly fat

Blog banner

Title: Modern Operating Systems: Powering the Digital Era

Blog banner

Little Habits, Big Impact: Daily Preschool Routines That Shape the Future

Blog banner

Flipkart

Blog banner

Social Engineering Attacks

Blog banner

SMARTSHEET MANAGEMENT SYSTEM

Blog banner

Clarizen

Blog banner

IT service level agreement

Blog banner

How to Avoid being a Victim of Cybercrime

Blog banner

Palm Vein Biometric Technology; Contactless vein authentication

Blog banner

Process Description

Blog banner

Why Meal Maharaj Prioritises Seasonal Vegetables in Every Meal Box

Blog banner

5 People who claimed to have Time Traveled

Blog banner

Why Data Security Is Important

Blog banner

DISK SCHEDULING

Blog banner

What is thread and multithreading ?

Blog banner

semaphores in os

Blog banner