A simple, rule-based chatbot developed in Python during my CodeAlpha internship.
This project is a basic conversational chatbot that interacts with users through the command line.
The chatbot recognizes predefined user inputs and responds appropriately using Python conditional statements, functions, loops, and input/output operations.
- User name input
- Greeting responses
- "How are you?" response
- Chatbot identity response
- Information about the project
- Help command
- Current time response
- Current date response
- Thank-you response
- Goodbye/exit command
- Handles unknown inputs
- Case-insensitive user input
- Python
- Python
datetimemodule
input()print()- Variables
if / elif / else- Functions
whileloopbreak- String methods
- Lists
datetime
- Make sure Python is installed on your computer.
- Download or clone this repository.
- Open the project folder in VS Code.
- Open the terminal.
- Run:
python chatbot.py- Enter your name and start chatting with the chatbot.
Bot: What is your name? Kashif
Bot: Nice to meet you, Kashif!
Bot: You can type 'help' to see what I can do.
Bot: Type 'bye' whenever you want to exit.
Kashif: hello
Bot: Hi Kashif! How can I help you?
Kashif: how are you
Bot: I'm fine, thanks! I hope you are doing well too.
Kashif: time
Bot: The current time is 03:30 PM.
Kashif: bye
Bot: Goodbye! It was nice talking to you.
This project was completed as part of the CodeAlpha internship project tasks.
Kashif Khan