A simple, interactive command-line chatbot built with Python as part of my Python Programming Internship (Task 4). The bot responds to predefined user greetings and queries using core Python control structures.
- Responds to common conversational inputs (
hello,how are you,bye). - Case-insensitive input handling (works with
HELLO,Hello, orhello). - Continuous conversation loop until the user decides to exit.
- Clean fallback message for unrecognized inputs.
- Functions: Modularized chatbot logic for clean code structure.
- Loops (
while): Keeps the chat session active until exit. - Conditional Statements (
if-elif-else): Matches user input with predefined responses. - Input/Output (
input(),print()): Handles terminal interaction.
- Clone the repository:
git clone https://github.com
- Navigate to the project folder:
cd basic-rule-based-chatbot - Run the script:
python ai_chatbot.py
You: hello
Bot: Hi!
You: how are you
Bot: I'm fine, thanks!
You: what is your name?
Bot: Sorry, I didn't understand that.
You: bye
Bot: Goodbye!
This project is licensed under the MIT License.