Create a new python file call Magic8Ball.py:
- Create a forever loop and inside the loop do the following:
- Ask user “Enter yes or no question.” and take user input and save/set user input into a variable called “user_question”.
- If user input is “quit”, print “Bye bye” and break from the While Loop.
- Generate random number between 1 to 8
- to generate random number between 1 to 8 and save/set random number into variable called “random_number”.
- Inside the while loop print to the screen according to “random_number”
- If random_number is equal to 1, print “It is certain.”
- If random_number is equal to 2, print “Most likely.”
- If random_number is equal to 3, print “Signs point to yes.”
- If random_number is equal to 4, print “I don’t think so.”
- If random_number is equal to 5, print “Ask again later.”
- If random_number is equal to 6, print “Concentrate and ask again.”
- If random_number is equal to 7, print “Outlook not so good.”
- If random_number is equal to 8, print “My reply is no.”
- After printing the answer, go back to Step 1 (Ask user “Enter yes or no question”) until user input “quit”.
- Create another version of Magic 8 Ball, but this time instead of using random.randint, use random.choice.