Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. mport random
  2. def eight_ball():
  3. print "Ask the magic 8ball a question"
  4. answer = raw_input()
  5. print random.choice(["It is certain","it is decidedly so","Yes","Most likely","maybe","Ask me again later","no","Do not count on it","My sources say no"])
  6.  
  7.  
  8. eight_ball()
  9.  
  10. num = 1
  11.  
  12. while num < 2:
  13. print "Do you want to ask another question? type 'yes' or 'no'."
  14. answer1 = raw_input()
  15. if answer1 == "yes":
  16. eight_ball()
  17. num = num + 1
  18. elif answer1 == "no":
  19. print "See ya"
  20. num = num + 1
  21. else:
  22. "That wasn't an option"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement