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

John Titor: The Time Traveler

Blog banner

virtual machines and virtualization

Blog banner

Disk Management

Blog banner

Unlocking the Secrets: Basic Operations of Computer Forensic Laboratories

Blog banner

Top 3 Places To Stay In Vienna

Blog banner

Functions of Operating System

Blog banner

Blockchain Security Technique

Blog banner

Why Should You Schedule Tweets on Twitter?

Blog banner

Importance Of Blockchain

Blog banner

KAHAWA TEA

Blog banner

Security Issues and Countermeasures

Blog banner

Electronic Evidence in Cyber Forensics

Blog banner

21ST CENTURY PATRIARCHY

Blog banner

Improving the Accuracy of GPS and GNSS

Blog banner

Cyber Forensics on IOT Devices

Blog banner

PPC Advertising and its Impressive Benefits

Blog banner

Senseless Teeths

Blog banner

PPT methodology

Blog banner

Lifestyle of a photographer

Blog banner

Multiprocessor and Multicore Organization

Blog banner

What is thread and alse multithreading

Blog banner

Social Media Sentiment Analysis

Blog banner

10 Alien Encounters and Abduction Stories

Blog banner

What is process

Blog banner

Socket Programming in Java

Blog banner

Google

Blog banner

Smart Shoephone: Is that technology overdose!?

Blog banner

The IT Service Lifecycle

Blog banner

?Why Social and Emotional Skills Matter More Than ABCs in Early Years?

Blog banner

Raid and levels of raid.

Blog banner

Diwali

Blog banner

Social Engineering

Blog banner

RAID and It's Levels

Blog banner

The Importance of Financial Literacy for College Students

Blog banner

Reconnaissance

Blog banner

WAKE UP ITS FOOD o'CLOCK...!!!!!

Blog banner

Mesh Topology

Blog banner

Lucidchart

Blog banner

Getting into Anime

Blog banner

Article on IT development trends

Blog banner

What is Virtual Memory

Blog banner

What makes Nugget RC Racing Florida’s Most Exciting Racing Events?

Blog banner