Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone please help with problem 3? I have to write a code that follows the step-by-step instructions seen in red in the Linux Mint

image text in transcribedimage text in transcribedCan someone please help with problem 3? I have to write a code that follows the step-by-step instructions seen in red in the Linux Mint software.

Problem 3. (Newton's Method) Using Program 1.3.6 (sqrt.py) from the IPP text as a model import sys import stdio EPSILON = 1e-15 c = float (sysargv [1] ) while abs (t - ct) >(EPSILON * t): # Replace t by the average of t and c/t t = (c/t + t) / 2.0 stdio.writeln (t) develop a program root .py that takes a float e and an integer k as command-line arguments and writese (kth root of c) to decimal places of accuracy, ie, use 0.00001 Hint: at each iteration, replace the estimate t bv t f(t)//"(t), where f(x) = zk-c and f,(z) = krk-11 and use the condition | 1-c/tk> to continue the loop $ python root.py 32 1.73205081001 $ python root.py 64 3 4.00000050864 Linux Mint [Running] root.py /coursework/homework3) File Edit View Search Tools Documents Help le "equality.py x e five-per-row.py x e root.py root.py: takes a float c and an integer k as command-line arguments and # writes the kth root of c to 5 decimal places of accuracy. import stdio import sys # Get c from command line, as a float. # Get k from command line, as an int

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions