This is Task 4 of my CodeAlpha Python Internship, where I built a simple rule-based chatbot named Chatty
The chatbot interacts with the user in a friendly, human-like way. It understands basic greetings, answers simple questions, and says goodbye politely.
It’s a console-based Python project made to demonstrate fundamental programming concepts like loops, conditionals, and user input handling.
--> Greets the user with a warm welcome
--> Replies to simple questions (like “how are you”, “your name”)
--> Responds to “thank you” and “bye”
--> Keeps chatting until the user types “bye”
--> Uses natural, human-like language
- Loops (
while True) - Conditionals (
if-elif-else) - String Handling (
lower(),in) - Input/Output
- The chatbot starts with a greeting.
- The user types something in the console.
- Based on keywords (like “hello”, “bye”, “how are you”), the bot replies.
- The chat continues until the user types “bye”, after which the bot ends the conversation politely.
PS C:\Users\user\Desktop\TASK3> & "C:\Program Files\Python313\python.exe" c:/Users/user/Desktop/TASK3/chatBot.py Hello! I’m Chatty, your friendly Python chatbot. Type 'bye' anytime to end our chat.
You: Hello
Chatty: Hey there! How are you doing today?
You: I AM FINE
Chatty: Hmm... I’m not sure what that means but I’ll learn someday!
You: HOW ARE YOU
Chatty: I’m just a bunch of Python code, but I’m feeling great! What about you?
You: THANK YOU
Chatty: Aww, you’re so kind! You’re welcome
You: BYEE
Chatty: Bye-bye! Have a wonderful day ahead