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

Traditional UNIX Scheduling

Blog banner

Deadlocks

Blog banner

EID UL FITR

Blog banner

K-means use cases

Blog banner

Review on Recovering Deleted Files

Blog banner

Starvation

Blog banner

Cyber Security in Data Breaching

Blog banner

Image Steganalysis in Digital Forensics

Blog banner

Data Mining

Blog banner

PPT methodology

Blog banner

Threads

Blog banner

Microsoft Word

Blog banner

Dos (Denial of service) Attack

Blog banner

Student Grade Calculator in LISP

Blog banner

A little bit of salt is all the hash needs!

Blog banner

Memory management

Blog banner

Dudhasagar waterfall ?

Blog banner

The Impact of Tolerances and Wall Thickness on Pipeline Integrity

Blog banner

Puri Jagannath temple

Blog banner

"Audit" In Data Science

Blog banner

Kernel in Operating System

Blog banner

Hello World

Blog banner

HR Automation : Need of the hour

Blog banner

Virtual Memory

Blog banner

PERT Overview

Blog banner

Digital Balance: Keeping Children Mindful in the Screen Age

Blog banner

How GIS in Agriculture Eliminates Guesswork

Blog banner

Jira Software

Blog banner

Dekkers Algorithm

Blog banner

Deadlock

Blog banner

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

Blog banner

Depression

Blog banner

EVOLUTION OF THE MIRCOPROCESSOR

Blog banner

You'll get to know about Pankaj Negi

Blog banner

Docker Framework

Blog banner

Ethical Hacking

Blog banner

The Art of Slow Fashion: Why Patola Defines Sustainable Luxury

Blog banner

Self managing devices

Blog banner

Secure Hypertext transfer protocol

Blog banner

Booting Process In Operating System

Blog banner

Real-Time Operating Systems (RTOS) Deep Explanation

Blog banner

Revolutionary AI Tool: ChatGPT

Blog banner