Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

HEY there :) In Python language could you please help me with my project. Topic Magic 8 Ball. Here is the list I have to

HEY there :)

In Python language could you please help me with my project.

Topic Magic 8 Ball.

Here is the list I have to use

1. It is certain

2. It is decidedly so

3. Without a doubt

4. Yes, definitely

5. Most likely

6. Reply hazy try again

7. Ask again later

8. Concentrate and ask again

9. Don't count on it

10. Outlook not so good

[This is what I have so far this part! ]

theList = ["It is certain", "It is decidedly so", "Without a doubt", "Yes, definitely", "You may rely on it","As I see it, Yes", "Most likely","Outlook good","Yes","Signs point to yes","Reply hazy try again","Ask again later","Better not tell you now", "Cannot predict now", "Concentrate and ask again", "Don't count on it", "My reply is no", "My source says no", "Outlook not so good", "Very doubtful"]

We are going to prompt the user to answer their question or the word QUIT.

[This is what I have so far for this.]

requestString("What would you like to ask the Magic 8 Ball? or type Quit to exit")

We are then going to randomly pick one of the responses, by generating a random number from 1 to 20 and display the appropriate response to the user.

This is where I am having problems. I know I have to use this

from random import * def main():

but as for the code, I am not too sure. I know I have to use a while loop like this, while alldone != true:

PLEASE help with rest! And the print out statement as well. HERE are the requirements

A few requirements for the program.

All the responses have to be stored in a simple list

The program is to continue until the user types in QUIT or quit as the question at which time the program will immediately end.

***For 5 points extra credit you can research the use of the upper() method to allow you to check for the user entering Quit in any case.

The program needs to thank the user for using it at the end of the program.

Also, the shortest code possible is best!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PostgreSQL 10 High Performance Expert Techniques For Query Optimization High Availability And Efficient Database Maintenance

Authors: Ibrar Ahmed ,Gregory Smith ,Enrico Pirozzi

3rd Edition

1788474481, 978-1788474481

More Books

Students also viewed these Databases questions

Question

4 How can you create a better online image for yourself?

Answered: 1 week ago