forked from Toumash/git-workshop
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathmagic_ifs.py
More file actions
40 lines (27 loc) · 808 Bytes
/
magic_ifs.py
File metadata and controls
40 lines (27 loc) · 808 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
33
34
35
36
37
38
39
40
import sys
import random
while True:
question = input("Ask the magic 8 ball a question: (press enter to quit) ")
answers = random.randint(1, 10)
if question == "":
sys.exit()
elif answers == 1:
print("It is certain")
elif answers == 2:
print("Outlook good")
elif answers == 3:
print("You may rely on it")
elif answers == 4:
print("Ask again later")
elif answers == 5:
print("Concentrate and ask again")
elif answers == 6:
print("Reply hazy, try again")
elif answers == 7:
print("My reply is no")
elif answers == 8:
print("My sources say no")
elif answers == 9:
print("My answers are real")
elif answers = 10:
print("My asnwers are not of any importance")