Question: Using a while loop , write the Python statements that will prompt the user for a number. If their response is 'Q' then the loop

Using awhile loop, write the Python statements that will prompt the user for a number. If their response is 'Q' then the loop should stop and print a done message. Otherwise, if the number is positive, you should print out the cube root of the number. A cube root of a number x is a number y such that y3= x. For example, the real cube root of 8, denoted 38, is 2, because 23= 8. Hint: You can calculate a root by using fractional power. Example: 90.5= 3.

If the number is negative, you should print out an error message and ask for another input. Write out the python code.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!