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

Love is in air.....

Blog banner

Information Technology In E- Commerce

Blog banner

All you need to know about Website Traffic

Blog banner

"Audit" In Data Science

Blog banner

Mariana Trench: The deepest depths

Blog banner

OS assignment 3

Blog banner

Time Series Analysis

Blog banner

UniProcessor Scheduling

Blog banner

Android Flashlight Application

Blog banner

gis substation

Blog banner

Modern operating system

Blog banner

Rain bow

Blog banner

Music

Blog banner

Real-Time Operating Systems (RTOS) Deep Explanation

Blog banner

Harsh Rathod

Blog banner

How to use open SSL for web server - browser communication

Blog banner

Article on Fresh Book

Blog banner

Navigation With Indian Constellation(NavIC) by ISRO in Geographic Information Systems

Blog banner

Buffering

Blog banner

Service Strategy principles

Blog banner

Security Issues

Blog banner

The Evolution of Operating Systems

Blog banner

IP ADDRESS

Blog banner

Introduction to Virtual Memory - 080

Blog banner

What if COVID does not exist!

Blog banner

Inventory management software system

Blog banner

Steganography and Steganalysis

Blog banner

10 Unsolved Mysteries all over the world

Blog banner

Multiprocessor and Multicore Organization

Blog banner

Microsoft Windows Overview

Blog banner

A-B-C of Networking: Part-1 (Basics)

Blog banner

Yahoo! mail

Blog banner

What are Virtual Machines

Blog banner

Security Issues and Countermeasures

Blog banner

Docker Framework

Blog banner

Virtual machine.

Blog banner

JIRA SOFTWARE

Blog banner

Software Piracy & Online Data Protection in Digital World

Blog banner

Linker

Blog banner

MQTT (MQ Telemetry Transport) in Data Science

Blog banner

INTERNET

Blog banner

Uniprocessor Scheduling

Blog banner