Python MicroP
Python MicroP
Project Title:
Rule-Based Chatbot using Python
Introduction
In the modern era of automation and artificial intelligence, chatbots have
emerged as powerful tools for simulating human-like conversations. A
chatbot is a software program designed to interact with users through text
or voice, providing automated responses to predefined queries. They are
widely used in customer service, virtual assistants, websites, and various
applications.
This project also encourages students to explore user interaction and lays
the foundation for more advanced topics such as Natural Language
Processing (NLP) and Machine Learning (ML) in the future.
Objective:
To create a simple rule-based chatbot using Python that can interact with the user and
respond to basic queries.
Working Principle:
The chatbot uses if-elif statements or dictionary-based matching to answer frequently
asked questions like greetings, name, weather, time, etc.
Python Code:
python
CopyEdit
import datetime
def chatbot():
print("🤖 ChatBot: Hello! I'm PyBot. Type 'exit' to end the chat.")
while True:
user_input = input("👤 You: ").lower()
Output: