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
1 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

What is Segmentation?

Blog banner

ACHIEVEMENTS IN OPERATING SYSTEMS

Blog banner

What Your Music Taste Reveals About Your Personality

Blog banner

What is metaverse?

Blog banner

Salt, Sand, and Smiles: Does the Maroubra Lifestyle Affect Your Enamel?

Blog banner

Data Security and Data Privacy in Data Science

Blog banner

Explain DBMS in Brief

Blog banner

Risk management in IT

Blog banner

Fault Tolerance

Blog banner

Social Engineering Deceptions and Defenses

Blog banner

MY MOST THRILLED TREK ..... BHAIRAVGAD

Blog banner

Is Your Password Complex Enough?

Blog banner

Save Girl Child

Blog banner

Digital Marketing Ethics Transparency Trust And Brand Reputation digital

Blog banner

Disk cache

Blog banner

Love is in air.....

Blog banner

Rain bow

Blog banner

Embracing the power of Modern Machine UNIX

Blog banner

Amazon

Blog banner

Types of Big Data

Blog banner

Things You Should Leave Behind In 2025, Whilst In 2026

Blog banner

Importance Of Time

Blog banner

TOP 5 GAMING GADGETS (2024)

Blog banner

Game via listing method

Blog banner

How to make Pancakes

Blog banner

Hot Mango Pickle (Methiyu)

Blog banner

Cache memory

Blog banner

A Weekend at Oak Tree Hotel: The Best Hotel Experience in Arcadia, Florida

Blog banner

Beautiful and stunning natural phenomena worth to see

Blog banner

Is Pursuing a Dance Career in India Worth it?

Blog banner

Security Issues and Countermeasures

Blog banner

Fitness

Blog banner

Importance of Network Security Risk

Blog banner

Ransomware

Blog banner

File Management In OS

Blog banner

Processes : Process description and control

Blog banner

Odoo

Blog banner

The Joy of Giving: How Festivals Teach Children Empathy and Gratitude

Blog banner

**THE MUJAWARR: Transforming the Logistics Industry**

Blog banner

The Lunchbox That Came Back Untouched — How to Handle a Fussy Eater at Preschool Age

Blog banner

NETWORK SECURITY RISKS

Blog banner

Classification Vs Clustring? What's the diffrence?

Blog banner