Question: Python 1. On slide 11 of the file MIT6_0001F16_Lec1 , we discussed about an algorithm to compute the exact square root of a number. With

Python

1. On slide 11 of the file MIT6_0001F16_Lec1, we discussed about an algorithm to compute the exact square root of a number. With an initial guess, compute the exact square root of the following numbers:

a) 280

b) 179

c) 321

Make sure that the guesses which you give are not closer than 10%. Of the individual numbers in a), b) c). Find how many iterations you need to arrive at the exact square root. Also find out if any of the square root computations may diverge (you need infinite number of iterations or you may not arrive at the exact square root and may go off-track).

Python 1. On slide 11 of the file MIT6_0001F16_Lec1, we discussed about

A NUMERICAL EXAMPLE square root of a number x is y such that y*y = x recipe for deducing square root of a number x (16) 1) Start with a guess, g 2) If g*g is close enough to x, stop and say g is the answer 3) Otherwise make a new guess by averaging g and x/g 4) Using the new guess, repeat process until close enough g*g |xlg (g+x/g)/2 9 4.17 4.17 17.36 3.837 4.0035 4.0035 16.0277 3.997 4.000002 3 16/3 6.0001 LECTURE 1

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 Databases Questions!