Advertisement
Guest User

Untitled

a guest
Jul 11th, 2014
3,970
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. import time
  2. from random import randint
  3.  
  4. replies =["Yes","No","Possibly", "Ask again later", "IDK"]
  5.  
  6. def question():
  7.     print "What is your question?"
  8.     question = raw_input()
  9.     print "Thinking"
  10.     time.sleep(3)
  11.     print replies[randint(0,4)]
  12.     end()
  13.  
  14. def end():
  15.     print "Thanks for playing! Do you want to try again?"
  16.     user_reply = raw_input()
  17.     if user_reply == "yes":
  18.         question()
  19.  
  20.  
  21. print "Welcome to the magic 8-ball"
  22. question()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement