In the class, I gave the sample code to get the cube root of a number by using BISECTION SEARCH. There are different ranges of numbers we have to handle, for example: number > 1; number < -1; 0< number < 1.

The first home assignment is to develop a software:

1. how many numbers the user wants to get the cube roots.

2. ask the user to input the numbers.

3. According to the range of number, using BISECTION search to get the cub root for each input number.

For Example:

The input :

Please input how many numbers you want to get the cube roots? 4
The number 1 is: 177
The number 2 is: 0.35
The number 3 is: -0.66
The number 4 is: -211

The output:

177 is: 5.614679574966431 (21 guesses)
0.35 is: 0.7046752929687501 (11 guesses)
0.66 is: -0.870673828125 (1
Cube root of -211 is: -5.95335054397583 (20 guesses)
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.