这是我目前的代码:
cu = 0
while cu != "stop" and cu != "Stop" and cu != "STOP" and cu != "quit" and cu != "Quit" and cu != "QUIT":
cu = str(input("Say anything to computer robot! Or say stop or quit and leave him alone and sad: "))
if "how" or "How" in cu:
print("I'm good, you?")
elif "Im good" or "Im well" in cu:
print("Fantastic!")
break
这是输出:
Say anything to computer robot! Or say stop or quit and leave him alone and sad: How are you?
I'm good, you?
Say anything to computer robot! Or say stop or quit and leave him alone and sad: asdf
I'm good, you?
Say anything to computer robot! Or say stop or quit and leave him alone and sad: Im good
I'm good, you?
我希望它输出“我很好,你呢?”如果输入包含“how”或“How”,我希望它输出“Fantastic!”如果输入包含“Im good”或“Im well”。
注意我是编程的初学者。谢谢你的帮助。