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

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

Blog banner

Why Iron-Rich Foods Matter and How to Include Them in Indian Meals

Blog banner

Why Moms Are Choosing Customised School Accessories Over Generic Products?

Blog banner

This is my first blog.

Blog banner

Memory management

Blog banner

Partnership in Learning: How Parent Involvement Shapes a Child’s Early Education

Blog banner

Virtual memory in windows

Blog banner

ZOHO

Blog banner

Self managing devices

Blog banner

What is Influencer Marketing and its Trends

Blog banner

ART AND CULTURE OF VRINDAVAN

Blog banner

Photorec - media recovery tool

Blog banner

City2Surf & Spring Fitness Recovery Guide: How Sports Drinks Silently Damage Enamel

Blog banner

You'll get to know about Pankaj Negi

Blog banner

The Evolution of the Microprocessor ~ Aditya Pai

Blog banner

File management -disha parekh

Blog banner

OS Assignment-3

Blog banner

Tea, Coffee, Red Wine, and Teeth: A Stain Survival Guide

Blog banner

INTERNET SECURITY

Blog banner

Deadlock

Blog banner

Deadlocks in operating system

Blog banner

How Men and Women Process Pain Differently

Blog banner

File Sharing

Blog banner

Can ChatGPT Answer All My Questions About Life?

Blog banner

Ethical Hacking

Blog banner

Basic Security For SOAP Services

Blog banner

ADD A SPICE TO YOUR LIFE.

Blog banner

Utilizing Data-Hiding and Retrieval Techniques in Cyber Forensics

Blog banner

Sleep Matters: The Science Behind Toddler Naps

Blog banner

Memory management

Blog banner

MQTT (MQ Telemetry Transport) in Data Science

Blog banner

The functions of operating system

Blog banner

Veg/Non-veg/Egg Tiffin Meals That Are Nutritious and Filling

Blog banner

Article on different management system

Blog banner

Data Lakes: A Key to Modern Data Management

Blog banner

USPS mail

Blog banner

How to Choose Your Daily Signature Scent Based on Your Personal Vibe?

Blog banner

Things You Should Leave Behind In 2025, Whilst In 2026

Blog banner

What are Virtual Machines

Blog banner

FRIENDSHIP

Blog banner

IS CONVERTING AMBITION INTO PROFESSION?

Blog banner

Virtual Memory

Blog banner