Skip to content

Instantly share code, notes, and snippets.

@XChrisUnknownX
Created July 27, 2018 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save XChrisUnknownX/d2cc3359c96348435e38ccb17e93d86f to your computer and use it in GitHub Desktop.
Save XChrisUnknownX/d2cc3359c96348435e38ccb17e93d86f to your computer and use it in GitHub Desktop.
simplified8ball.py
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