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

Save Girl Child

Blog banner

Virtual Memory

Blog banner

Message Passing in OS

Blog banner

Life

Blog banner

A book review

Blog banner

Note Taker App

Blog banner

Virtual Memory

Blog banner

Principles of Concurrency

Blog banner

Importance of Morning Routines for Students During the Festive Season

Blog banner

Linux Memory Management

Blog banner

Top 10 Logos and their meanings

Blog banner

FILE SHARING

Blog banner

Khau Galli – Vile Parle

Blog banner

RAID - LEVELS OF RAID

Blog banner

Mumbai local ......

Blog banner

10 Interesting Facts about Death Note

Blog banner

Vikrant’s first blog

Blog banner

Hot Mango Pickle (Methiyu)

Blog banner

Threads

Blog banner

Threat management

Blog banner

It's all about our Brain.- The Brain Metaphor

Blog banner

Starvation

Blog banner

What is time ? The term which has astonished Scientists

Blog banner

Memory hierarchy

Blog banner

What Makes Patola the Queen of Silk?

Blog banner

Earth with no trees

Blog banner

Modern operating system

Blog banner

10 Reasons to Date a South Indian Girl

Blog banner

Pro-Tips On How To Keep your Foot Healthy

Blog banner

Embracing the power of Modern Machine UNIX

Blog banner

MOVEMBER

Blog banner

Four Stalls Every Vegetarian Needs To Eat At Outside Vile Parle Station

Blog banner

Virtual memory in os

Blog banner

Big O Notation

Blog banner

Measuring IT Risk

Blog banner

VPN

Blog banner

5 Stages of Digital Marketing

Blog banner

Virtual Machine

Blog banner

Evolution of Operating Sytems

Blog banner

Understanding Input Based Keylogger Activation Systems: Risks and Mitigation

Blog banner

A buffer overflow

Blog banner

An Overview of Virtual Machines

Blog banner