I am brand new to coding in python (and mostly in general, apart for some basic JS knowledge). I am starting off by writing a fun text-based interactive story game, which runs through command prompt. The basic premise is that the player is interacting with their computer's built-in ai assistant. Everything seemed to be working out fine, until I realized that some of the possible responses were not being recognized. I cannot figure out where the problem lies. My description won't do the problem any justice, so I'll just show the code itself. (I am using visual studio for this)
print("Assistant: Good Morning, User.")
response=input("Enter Response: ").lower()
print("Processing, please wait...")
import time
time.sleep(3)
if("good morning" in response):
print("Assistant: Yes, I suppose it is.")
elif("hello" or "hi" in response):
print("Assistant: I hope you are well today.")
elif("no" or "eh" in response):
print("Assistant: I am sorry to hear that, user.")
else:
print("Assistant: ...")
time.sleep(1)
print("Assistant: Would you like me to display the news, as usual?")
res1=input("Enter Response: ").lower()
print("Processing, please wait...")
time.sleep(3)
if("yes" or "sure" in res1):
print("Assistant: Okay, here is today's news.")
elif("no" or "i'm good" in res1):
print("Assistant: Is that so? As you wish, user.")