forked from 20owais/Hacktoberfest-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmagic ball.py
More file actions
21 lines (16 loc) · 717 Bytes
/
magic ball.py
File metadata and controls
21 lines (16 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import random
answers=['It is certain','It is decidedly so','Without a doubt','Yes-definitely',
'You may rely on it','As I see it,yes','Most likely','Outlook good'
,'Yes Signs point to yes','Reply hazy','try again','Ask again later','Better not tell you',
'Cannot predict now','Concentrate and ask again','Dont count on it','My reply is no','My sources say no',
'Outlook not so good','Very doubtful']
def replay():
print("Want to ask another question? [y/n]")
ans=input()
magic_ball()if ans == 'y' else exit()
def magic_ball():
print("Hello! Enter your question")
input()
print(random.choice(answers))
replay()
magic_ball()