if elif else challenge

HollyPepperony Aug 18th, 2019 (edited) 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. phrase = input("Do you want to play a game? ")
  3. while phrase != "quit":
  4.     if "no" in phrase or "n't" in phrase:
  5.         print("go to bed then")
  6.         break
  7.     elif "ye" in phrase or "love" in phrase or "like" in phrase:
  8.         print ("Yahoo, let's do it!!!")
  9.         break
  10.     else:
  11.         print ("Sorry I don't understand '" + phrase + "'")
  12.         phrase = input("\rSo, do you want to play a game? ")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand