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

How College Events Build Real-world Skills You Can’t Learn From Textbooks

Blog banner

Data Science in Predictive Analytics: Transforming Business Decision-Making

Blog banner

MEMORY MANAGEMENT REQUIREMENT

Blog banner

Solving Problems with AI: The Power of Search Algorithms

Blog banner

JUSTICE FOR EVERY “BEZUBAAN ANIMAL”

Blog banner

Explain the concept of ( MIS) Management information systems

Blog banner

Mobile Survey

Blog banner

Virus

Blog banner

Man In The Middle Attack

Blog banner

Virtual memory in Operating System

Blog banner

OPERATING SYSTEM

Blog banner

Hosting basics

Blog banner

Microsoft powerpoint presentation

Blog banner

Protect yourself from System Hacking with these Simple Steps

Blog banner

Top 10 Logos and their meanings

Blog banner

Direct Memory Access

Blog banner

Multiprocessor and Multicore Organization

Blog banner

Compromising Mobile Platforms

Blog banner

Understanding Univariate, Bivariate, and Multivariate Analysis in Data Science

Blog banner

Deadlocks

Blog banner

Article on Zoho Corporation

Blog banner

Things You Should Leave Behind In 2025, Whilst In 2026

Blog banner

Data Science & AI

Blog banner

Sagar Parikrama

Blog banner

Art and Culture of Rajasthan

Blog banner

Is Social Media Marketing The Next Wave Of Digital Marketing?

Blog banner

Evolution of Operating system.

Blog banner

Virtual Machine

Blog banner

Why Should You Schedule Tweets on Twitter?

Blog banner

 " Healing of Yoga "

Blog banner

(Input/Output) in os

Blog banner

Networking 101: How to Build Meaningful Connections in College

Blog banner

How to feel Happy everyday day

Blog banner

Introduction to Data Science: Life Cycle & Applications

Blog banner

Importance of Education

Blog banner

E-learning in today's world

Blog banner

Types of Big Data

Blog banner

Direct memory access (DMA)

Blog banner

This too shall pass

Blog banner

Why Consistency in Eating Habits Matters and How Meal Maharaj Makes It Easy

Blog banner

Memory Management

Blog banner

Introduction to GIS

Blog banner