I would do something like this
from random import randint
from time import sleep as sl
responses = [
"Welcome to the useless magic 8 ball! Please hold.",
"(we will not provide you with any legitimate means to discern future outcomes.)",
"\nHow may we be of service today?",
"If you would like to shake the ball just press enter, otherwise enter quit.\n",
"consulting psychiatrists for professional responses",
"\nBINGO! you got lucky! your life is about to change.",
answers = [
"The only way you'll ever get that answer from me is to pry it from my cold, dead hands.",
"Thou shalt be exalted with the gnarliest of fist bunps.",
"Thou'rt mad to say it.",
"That information is classified.",
"If I told you, I'd have to kill you.",
"HAHA sucks to be you.",
"I find your visage highly displeasing.",
"Only you can save mankind.",
"The price of my fortunes...is the blood of a freshly exsanguinated gopher.",
"= _ =",
"Fear of the unknown is what imprisons us.",
"Don't look behind you.",
"STOP THIS NONSENSE",
"You offend me deeply.",
"I find our conversations tedious.",
"This is the way the world ends: not with a bang but with a whimper."
def print_count_wait(msg, count=1, time_wait=1):
while count > 0:
count -= 1
This function returns a value from the answers list.
return answers[randint(0, len(answers) - 1)]
def shake_ball(s_count=5, l_count=3):
hold = input(responses)
if hold == 'quit':
if __name__ == "__main__":
I added some wait timers to the code so it makes it appear as if it is working, I also changed your answers into a list so you could just use random on the list and get it that way.
Also, I like holding all text in a list in one place that way I can easily modify any of the text entries in one place. Makes it easier to maintain a program.
I also created a custom print function that prints out a message a certain amount of times after waiting a given period of time.
If you have any questions ask freely.
That is a good suggestion also.