Question: Package Newton's method for approximating square roots (Case Study: Approximating Square Roots) in a function namednewton. This function expects the input number as an argument

Package Newton's method for approximating square roots (Case Study: Approximating Square Roots) in a function namednewton. This function expects the input number as an argument and returns the estimate of its square root. The program should also include amainfunction that allows the user to compute the square roots of inputs from the user and python's estimate of its square roots until theenter/returnkey is pressed.

An example of the program input and output is shown below:

Enter a positive number or enter/return to quit: 2 The program's estimate is 1.4142135623746899 Python's estimate is 1.4142135623730951 Enter a positive number or enter/return to quit: 4 The program's estimate is 2.0000000929222947 Python's estimate is 2.0 Enter a positive number or enter/return to quit: 9 The program's estimate is 3.000000001396984 Python's estimate is 3.0 Enter a positive number or enter/return to quit 

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!