Menu

#Elif

4 posts

Feed·
4 of 4 posts
📰
0

Hi, I’m learning Python and built a simple chatbot using loops and conditions. It can respond to greetings and basic inputs. I’d appreciate feedback on how to improve it or make it smarter.

Reddit r/learnpython·u/Inside-Card9720·5 months ago
#Jqu8dSc2
#user#print#name#input#elif#article

name = input("Bot: What's your name? ") while True: user = input("You: ").lower() if "hello" in user: print(f"Bot: Hi {name}!") elif "how are you" in user: print("Bot: I'm just code, but I'm doing fine!") elif "bye" in user: print("Bot:

15s
Read More