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

INTERNET SECURITY

Blog banner

Predicting Student Performance with Data Science

Blog banner

Junk food vs healthy food

Blog banner

Benefits of yoga and meditation

Blog banner

Network Forensics

Blog banner

Note on Process, Process creation and Process termination

Blog banner

How To Secure Operating Systems ?

Blog banner

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

Blog banner

Social Media Marketing Trends 2022

Blog banner

Security issues

Blog banner

Goa Trip With Friends

Blog banner

PHISHING

Blog banner

Deadlock and starvation

Blog banner

Policies for Service Transition

Blog banner

Why we fail after giving 100% ?

Blog banner

What is Vishing?

Blog banner

Penetration Testing

Blog banner

GIS Bharat Maps

Blog banner

Hash password! Is it really secured?

Blog banner

Data Warehouse Bus Matrix

Blog banner

Concurrency:Deadlock and Starvation

Blog banner

MySQL

Blog banner

Dancing Classes In Mumbai

Blog banner

Atlantis - The Lost Island.........

Blog banner

INTERNET

Blog banner

Some facts about Technology

Blog banner

Modern operating system

Blog banner

Open Source Project By Google

Blog banner

KPMG (Klynveld Peat Marwick Goerdeler)

Blog banner

How to use open SSL for web server - browser communication

Blog banner

VIRTUAL MACHINES

Blog banner

What are NFT s?

Blog banner

Disk cache

Blog banner

Understanding Regression Analysis

Blog banner

Why Should You Schedule Tweets on Twitter?

Blog banner

Life of an army person

Blog banner

EMAIL INVESTIGATION

Blog banner

Constrains in service design

Blog banner

Twisted world

Blog banner

ACHIEVEMENTS IN OPERATING SYSTEMS

Blog banner

Phishing

Blog banner

Virtual Machine

Blog banner