Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Project 1: Rule-Based AI Chatbot

Goal: Build a simple chatbot that responds to predefined user inputs using pure control flow logic.

Key Concepts: Control flow, decision-making logic, dictionary-based lookup, input sanitization.

How it works:

  • Takes raw user input and normalizes it with .lower().strip()
  • Looks up the cleaned input against a dictionary of known intents using .get() with a fallback response
  • Runs in a continuous while True loop and exits cleanly on a kill command

Files: chatbot.py

How to run:

cd "C:\Users\user\OneDrive\Desktop\Project1"
python chatbot.py

Sample interaction:

Chatbot: Hello! I'm your rule-based assistant. Type 'bye' to exit.
You: hello
Chatbot: Hi there! How can I help you today?
You: bye
Chatbot: Goodbye! Have a great day.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages