Question: Exercise 1: (2 pts, manually graded) Copy the following code into the following code cel and comment each line to give an explanation of what
Exercise 1: (2 pts, manually graded) Copy the following code into the following code cel and comment each line to give an explanation of what the entire program does. def f(x): return 6****5-5 det df(x): return 30*x**4-2 def dxf, x): return abs (0 - f(x)) def newtons_method(, df, x0, e): delta - dx (1, 0) while delta > e: x0 - XO - f(x0)/dt (0) delta - dxf, XO) print('Root is at:'. x0) print('(x) at root is ', f(x0)) Exercise 1: (2 pts, manually graded) Copy the following code into the following code cel and comment each line to give an explanation of what the entire program does. def f(x): return 6****5-5 det df(x): return 30*x**4-2 def dxf, x): return abs (0 - f(x)) def newtons_method(, df, x0, e): delta - dx (1, 0) while delta > e: x0 - XO - f(x0)/dt (0) delta - dxf, XO) print('Root is at:'. x0) print('(x) at root is ', f(x0))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
