Advertisement
Guest User

Untitled

a guest
Dec 13th, 2014
629
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. __author__ = 'john'
  2.  
  3. import random
  4. import time
  5. x = True
  6. while x:
  7.     text = input("ask the magic 8 ball anything:\n")
  8.     print("thinking...")
  9.     time.sleep(4)
  10.     answerint = random.randint(0,7)
  11.     answer = ["it is certain", "it is decidedly so", "without a doubt", "yes definitely", "you may rely on it", "as i see it, yes", "most likely", "outlook good"][answerint]
  12.     print(answer)
  13.     re = input("would you like to ask another question? yes or no:")
  14.     if re == "no":
  15.         print("thanks for playing")
  16.         x = False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement