Created
December 5, 2014 04:42
-
-
Save charlesgmoore/fbb5d66bae6c62205909 to your computer and use it in GitHub Desktop.
magic_8_ball
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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