Skip to content

Instantly share code, notes, and snippets.

@charlesgmoore
Created December 5, 2014 04:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charlesgmoore/fbb5d66bae6c62205909 to your computer and use it in GitHub Desktop.
Save charlesgmoore/fbb5d66bae6c62205909 to your computer and use it in GitHub Desktop.
magic_8_ball
#!/usr/bin/env python3.4
import time
import random
import os
os.system('clear')
play_again = 'y'
answers = ["Yes, most definitely!", "The chances are high!", "Not likely!", "May the odds be ever in your favor.", "You got no shot, kid.", "Try it out and see!", "23% of working", "99.9% success rate", "Congratulations, yes!", "Ask a probably question," "Ask again later", "Better not tell you now", "Cannot predict now", "Concentrate and ask again", "Don't count on it"]
while play_again != 'n':
input("Please enter your question\n")
print("Thinking...")
time.sleep(3)
print(random.choice(answers))
play_again = input("Would you like to play again? y/n ")
os.system('clear')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment