Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help me to write a python code base on the Newton's method. The algorithm for Newton's method follows: Initialize guess to x/2 While guess

please help me to write a python code base on the Newton's method.

The algorithm for Newton's method follows:

Initialize guess to x/2 While guess is not good enough do update guess to be the average of guess and x/guess 

When this algorithm completes, guess contains an approximation of the square root.The quality of the approximation depends on how you define "good enough". In this exercise, guess was considered good enough when the absolute value of the difference between guess * guess and x was less than or equal to 10^-12.

Here's the code I should start with:

def find_sqrt(x): # start your code below

Could you please help me to finish the code by following the algorism above? 

Thanks!

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

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

21. How does nicotine affect dopamine synapsespg105

Answered: 1 week ago