A simple rule-based chatbot in Python, built for the CodeAlpha Python Programming Internship.
Author: Ali Nawaz
The program reads the user's message, converts it to lowercase, and checks for
keywords using if / elif / else. It then prints the matching reply.
- Greets the user (hello, hi, salam)
- Tells the current time and date
- Tells a joke
- Answers basic questions (name, Python, AI)
- Says goodbye with
bye,exitorquit
python chatbot.py
You: hello
CodeBot: Hello! How can I help you today?
You: what is the time
CodeBot: The current time is 08:30 PM
You: bye
CodeBot: Goodbye! Have a nice day.
- Functions, loops and conditions
- String methods (
lower,strip,split) datetimemodule