Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Are you square? 10 Possible Points Due: Fri Jan 27,2023 1:59pm IN PROGRESS Next Up: Submit Assignment Unlimited Attempts Allowed Details (the following assignment was

image text in transcribed

image text in transcribed

Are you square? 10 Possible Points Due: Fri Jan 27,2023 1:59pm IN PROGRESS Next Up: Submit Assignment Unlimited Attempts Allowed Details (the following assignment was borrowed heavily from "Fundamentals of Python" by Kenneth Lambert) In this assignment you will be writing a program to estimate the square root of a number using Newton's Method. To do this you will need to request a positive number from the user. You will then estimate the square root of the number using Newton's Method as described below. Once that estimate is computed will then use Python's built-in math library to check your estimate by comparing it to the results of the math library's sqrt() function and note the difference. In the year 1669 , Sir Isaac Newton wrote a mathematical treatise in which he described an approximation method for computing the square roots of polynomial functions. This method was later refined to a more generalized form to apply to more numeric and algebraic situations. Recall that the square root of a positive number x is any number y such that y=x. Newton discovered that if you estimate the value of y to be a number z (any reasonable initial guess will do) then a better estimate of y is the average of z and the value x/z. This process can be applied repeatedly until you converge on a value, and that value is the Newton approximation of the square root of The output of the program is below: Enter a positive number: 3 Newton's estimate of the square root of 3:1.73205081001 Python's estimate of the square root of 3:1.73205080757 The difference between the two methods is: 0.00000000244

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_2

Step: 3

blur-text-image_3

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

Advances In Databases And Information Systems Second East European Symposium Adbis 98 Poznan Poland September 1998 Proceedings Lncs 1475

Authors: Witold Litwin ,Tadeusz Morzy ,Gottfried Vossen

1st Edition

3540649247, 978-3540649243

More Books

Students also viewed these Databases questions