Answered step by step
Verified Expert Solution
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started