Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. import random
  2.  
  3. def eightBall():
  4. ans = ["It is certain.",
  5. "It is decidedly so.",
  6. "Yes, definitely.",
  7. "Reply hazy, try again.",
  8. "Ask again later.",
  9. "Concentrate and ask again.",
  10. "My reply is no.",
  11. "Outlook not so good.",
  12. "Very doubtful."]
  13.  
  14. print ("Ask me a question and I shall give you an answer.")
  15. q = input()
  16. if "?" not in q:
  17. print ("That wasn't a question.")
  18. eightBall()
  19. else:
  20. print (random.choice(ans))
  21. if random.choice(ans) == "Reply hazy, try again." or random.choice(ans) == "Ask again later." or random.choice(ans) == "Concentrate and ask again.":
  22. eightBall()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement