Skip to content

I have Updated 8balls-magic.py #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions 8balls-magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,35 @@
ans = True

while ans:
question = raw_input("Ask the magic 8 ball a question: (press enter to quit) ")
question = int(input("Ask the magic 8 ball a question: (press enter to quit) "))

answers = random.randint(1,8)

if question == "":
sys.exit()

elif answers == 1:
print "It is certain"
print("It is certain")

elif answers == 2:
print "Outlook good"
print("Outlook good")

elif answers == 3:
print "You may rely on it"
print("You may rely on it")

elif answers == 4:
print "Ask again later"
print("Ask again later")

elif answers == 5:
print "Concentrate and ask again"
print("Concentrate and ask again")

elif answers == 6:
print "Reply hazy, try again"
print("Reply hazy, try again")

elif answers == 7:
print "My reply is no"
print("My reply is no")

elif answers == 8:
print "My sources say no"
print("My sources say no")
else:
print("Wrong Input")