Advertisement
HBSB

Python 101 this AND that OR the other

Dec 2nd, 2020
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. phrase=input("Talk to me. >")
  2. if phrase=="hi" or phrase=="hey":
  3.     print("hello")
  4. elif phrase=="what's your name?" or phrase=="whats your name":
  5.     print("marvin")
  6. elif phrase=="what are you?":    
  7.     print("Sorry, I don't understand " + " 'what are you'")
  8. print("bye")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement