# Magic Eight Ball Game for Different Age Groups
# Kate Maloney
# Sat Nov 5, 2016
import random
def MagicEight(MagicAnswers):
UQuestion = input("What is your question?")
MagicNumber=random.randint(1, 8)
print("The Magic Eight Ball says,")
print(MagicAnswers[MagicNumber])
def play():
MagicAnswershs = ["Word.","LOL. You need to ask again.","Umm, like, no.","Hello???? I think not.","You shouldn't be wasting time like this. Go study.","You'll find out after college.","ROTFLMTO. You should know the answer is yes.","ROTFLMTO. You should know the answer is no."]
MagicAnswersadult = ["yes","no","maybe","It won't matter.","Reply hazy, try again","Better not tell you now.","It is certain.","Forget about it. The world will end after this election."]
uname = input("What is your name?")
print("Hello",uname)
uage = int(input("How old are you?"))
if uage <= 20:
MagicAnswers = MagicAnswershs
else:
MagicAnswers = MagicAnswersadult
MagicEight(MagicAnswers)
while True:
answer = input("Do you want the Magic Eight Ball to answer a question?")
if answer == 'yes':
play()
elif answer == 'no':
break
else:
print("I dont understand. Please answer yes or no, all lower case.")
# Kate Maloney
# Sat Nov 5, 2016
import random
def MagicEight(MagicAnswers):
UQuestion = input("What is your question?")
MagicNumber=random.randint(1, 8)
print("The Magic Eight Ball says,")
print(MagicAnswers[MagicNumber])
def play():
MagicAnswershs = ["Word.","LOL. You need to ask again.","Umm, like, no.","Hello???? I think not.","You shouldn't be wasting time like this. Go study.","You'll find out after college.","ROTFLMTO. You should know the answer is yes.","ROTFLMTO. You should know the answer is no."]
MagicAnswersadult = ["yes","no","maybe","It won't matter.","Reply hazy, try again","Better not tell you now.","It is certain.","Forget about it. The world will end after this election."]
uname = input("What is your name?")
print("Hello",uname)
uage = int(input("How old are you?"))
if uage <= 20:
MagicAnswers = MagicAnswershs
else:
MagicAnswers = MagicAnswersadult
MagicEight(MagicAnswers)
while True:
answer = input("Do you want the Magic Eight Ball to answer a question?")
if answer == 'yes':
play()
elif answer == 'no':
break
else:
print("I dont understand. Please answer yes or no, all lower case.")