#randint
from time import sleep
#clear output()
from random import randint
#sleep()
from IPython.display import clear_output
#this is the responses that the generator gives you for your answer.#
response = ["As I see it, yes.", "Ask again later.", "Better not tell you now.", "no answer from me","my sources say no", "this is true","maybe not","Try again next year"]
#allows the program to exit and retry and sleep timer allows the program to sleep or wait #
def leave():
answering = input("Do you want to go again? yes or no ==> ")
if answering == "yes":
main()
elif answering == "no":
clear_output()
print("your choice, have a good day!")
else:
leave()
def main():
sleeptimer = randint(3, 6)
#gives a random number from 0-8#
responseitem = randint(0,8)
#allows the person to type their question and clears the code#
question = input("What is your question?")
if question == "":
question = "Here is the answer to your secret question."
clear_output()
print("I am thinking of your answer..")
clear_output()
#allows the program to respond to your question#
print("{} \n".format(question))
print(response[responseItem])
leave()
main()