In [ ]:
 
In [1]:
#!/usr/bin/python3
# Nicholas Roczynski

import time
import random

def main():
    
    #The list
    x = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20"]
    
    print("Ask your question.")
    print("Typing the word 'exit' will end the code")
    print()
    print("If you don't wanna say your question out loud,")
    print("then type nothing and it will know your")
    print("question for you.")
    print()
    question = input("==> ")
    
    if question == "exit":
        end()
        
    output = random.choice(x)
    
    print("Fetching Results . . . ")
    timeSleep = random(3, 10)
    time.sleep(3, 10)
    
    print()
    # Positive Answers
    if output == "1":
        print("It is certain.")
    elif output == "2":
        print("It is decidedly so.")
    elif output == "3":
        print("Without a doubt.")
    elif output == "4":
        print("Yes, definitely")
    elif output == "5":
        print("You may rely on it.")
    elif output == "6":
        print("As I see it, yes.")
    elif output == "7":
        print("Most likely.")
    elif output == "8":
        print("Outlook good.")
    elif output == "9":
        print("Y E S")
    elif output == "10":
        print("Signs point to yes.")
        
    # Negative Answers
    elif output == "11":
        print("Don't count on it.")
    elif output == "12":
        print("My reply is no.")
    elif output == "13":
        print("My sources say no.")
    elif output == "14":
        print("Outlook not so good.")
    elif output == "15":
        print("Very doubtful.")
        
    # 'Try Again' Answers
    elif output == "16":
        print("Reply hazy, try again.")
    elif output == "17":
        print("Ask again later.")
    elif output == "18":
        print("Better not tell you now.")
    elif output == "19":
        print("Cannot predict now.")
    else:
        print("Concentrate and ask again.")

    print()
    print("Press <Enter> to continue.")
    print()
    input()
    main()

def end():
     print("Thank you, Goodbye! :)")
    
if __name__ == "__main__":
    print("Welcome!")
    print()
    print("Press <Enter> to Begin.")
    print()
    input()
    main()
Welcome!

Press <Enter> to Begin.


Ask your question.
Typing the word 'exit' will end the code

If you don't wanna say your question out loud,
then type nothing and it will know your
question for you.

==> 
Fetching Results . . . 
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[1], line 91
     89 print()
     90 input()
---> 91 main()

Cell In[1], line 27, in main()
     24 output = random.choice(x)
     26 print("Fetching Results . . . ")
---> 27 time.sleep(3, 10)
     29 print()
     30 # Positive Answers

TypeError: time.sleep() takes exactly one argument (2 given)
In [ ]:
 
In [ ]: