Skip to content
Public template

About

A simple rule-based CLI chatbot built in Python using if-elif statements, functions, and loops.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Basic Rule-Based Chatbot

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.

✨ Features

  • Responds to common conversational inputs (hello, how are you, bye).
  • Case-insensitive input handling (works with HELLO, Hello, or hello).
  • Continuous conversation loop until the user decides to exit.
  • Clean fallback message for unrecognized inputs.

🛠️ Concepts Used

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

🚀 How to Run

  1. Clone the repository:
    git clone https://github.com
  2. Navigate to the project folder:
    cd basic-rule-based-chatbot
  3. Run the script:
    python ai_chatbot.py

💬 Sample Output

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!

📄 License

This project is licensed under the MIT License.

About

A simple rule-based CLI chatbot built in Python using if-elif statements, functions, and loops.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages