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

GEOLOGY AND GEO-TECTONIC FRAME WORK OF WESTERN BASTAR CRATON

Blog banner

File and File System Structure

Blog banner

Apache Kafka

Blog banner

Modern Operating System

Blog banner

Street foods

Blog banner

Disk cache

Blog banner

Use case of K-means clustering

Blog banner

Beyond the Track: Why the Best Hotel in Arcadia, Florida, Completes Your IMSA Sebring Getaway

Blog banner

Evolution of Operating Sytems

Blog banner

Importance of Morning Routines for Students During the Festive Season

Blog banner

MEMORY MANAGEMENT FILE

Blog banner

Disk Scheduling

Blog banner

File management

Blog banner

All you need to know about Website Traffic

Blog banner

Device driver

Blog banner

Royal enfield

Blog banner

Full Disk Encryption on Digital Forensics

Blog banner

10 Amazing facts about Tokyo Ghoul

Blog banner

Daycare Centres Help Children Transition into Structured Learning

Blog banner

Deadlock and Starvation

Blog banner

Education?

Blog banner

objectives and functions of operating system

Blog banner

Embracing the power of Modern Machine UNIX

Blog banner

Note on Process, Process creation and Process termination

Blog banner

Information of meesho company

Blog banner

Vaping vs. Chewing Gum: The Hidden ‘Stress Fix’ Destroying Sydney’s Teeth

Blog banner

Deadlock

Blog banner

Technical SEO : Total Guide

Blog banner

Data Warehousing

Blog banner

Deadlock and Starvation

Blog banner

Threat management

Blog banner

Artical on FreshBooks

Blog banner

Data-Driven Prediction of Virtual Item Prices in Online Games

Blog banner

The Impact of Cyber Forensics on Corporate Governance and Compliance

Blog banner

Landslide Hazard

Blog banner

What is Virtual Memory

Blog banner

PERSONALITY DEVELOPMENT

Blog banner

Memory management

Blog banner

Solomon’s Castle: A Quirky Florida Attraction Worth Visiting from Arcadia

Blog banner

LIFEHACKER

Blog banner

Top 3 Places To Stay In Vienna

Blog banner

Understanding Toddler Tantrums: What They Really Mean

Blog banner