Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. import random
  2.  
  3. while True:
  4.     q = input("\nAsk the magic 8ball a yes or no question...\n> ")
  5.     answers = [
  6.         "Yes",
  7.         "No",
  8.         "Ask again later",
  9.         "Most likely",
  10.         "Probably not",
  11.         "It is unknown",
  12.         "Definitely",
  13.         "Cannot predict now",
  14.         "Without a doubt",
  15.         "You may rely on it"
  16.     ]
  17.  
  18.     print(random.choice(answers), "\n")
  19.  
  20.     r = input("Ask another question? [y/n]\n> ").lower()
  21.     if r not in ["y", "yes"]:
  22.         break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement