Created
July 27, 2018 17:01
-
-
Save XChrisUnknownX/d2cc3359c96348435e38ccb17e93d86f to your computer and use it in GitHub Desktop.
simplified8ball.py
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
import time | |
import random | |
while True: | |
print("The magic 8 ball will now let you ask a question.") | |
print("") | |
dinosaurs = input(" ") | |
print("") | |
if "?" in dinosaurs: | |
pass | |
else: | |
print("You did not use a question mark in your question. I will not answer until you do.") | |
print("") | |
time.sleep(2) | |
continue | |
time.sleep(2) | |
if "Jovanna" in dinosaurs: | |
print("The answer is yes.") | |
print("") | |
time.sleep(2) | |
continue | |
else: | |
pass | |
print("The magic 8 ball will now answer your question.") | |
print("") | |
time.sleep(2) | |
x = random.randint(1, 100) | |
if x <= 33: | |
print("The answer is yes.") | |
elif x <= 66: | |
print("The answer is no.") | |
elif x <= 82: | |
print("The answer is maybe.") | |
elif x <= 97: | |
print("The answer is sometimes.") | |
elif x <= 98: | |
print("The answer is never.") | |
else: | |
print("The answer is always.") | |
time.sleep(2) | |
print("") | |
continue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment