0% found this document useful (0 votes)
6 views1 page

Chat Bot

The document is a simple Python chatbot program that interacts with users through text input. It responds to greetings, inquiries about its name, and offers help, while also allowing users to exit the conversation by typing 'bye'. The chatbot provides basic conversational responses but lacks advanced functionality.

Uploaded by

kalpanapriyam213
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

Chat Bot

The document is a simple Python chatbot program that interacts with users through text input. It responds to greetings, inquiries about its name, and offers help, while also allowing users to exit the conversation by typing 'bye'. The chatbot provides basic conversational responses but lacks advanced functionality.

Uploaded by

kalpanapriyam213
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

print("Welcome to ChatBot! Type 'bye' to exit.

\n")

while True:
user_input = input("You: ").lower()

if user_input == 'bye':
print("ChatBot: Goodbye! Have a nice day.")
break

if 'hello' in user_input or 'hi' in user_input:


print("ChatBot: Hello! How can I help you today?")

elif 'how are you' in user_input:


print("ChatBot: I'm just a program, but I'm doing fine! How about you?")

elif 'your name' in user_input:


print("ChatBot: I'm a simple chatbot created with Python.")

elif 'help' in user_input:


print("ChatBot: I can chat with you, answer basic questions, and respond to
greetings.")
, .
elif 'thanks' in user_input or 'thank you' in user_input:
print("ChatBot: You're welcome!")

else:
print("ChatBot: I'm not sure how to respond to that.")

You might also like