-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path8ball2.py
More file actions
32 lines (26 loc) · 903 Bytes
/
8ball2.py
File metadata and controls
32 lines (26 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import random
import time
import sys
list = ["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"
]
def userinput():
print "What is your question?"
question = raw_input()
print "Thinking"
time.sleep(3)
print random.choice(list)
final()
def final():
print("Would you like to ask another question?")
user_reply = raw_input()
while input:
if user_reply == "yes":
userinput()
else:
print("Thanks for playing!")
sys.exit(0)
print("Welcome to the Magic 8 Ball!")
userinput()