fork download
  1. def newton(a,iter):
  2. if iter<maxiter and abs(f(a))>toler:
  3. #print(a)
  4. a=a-f(a)/fder(a)
  5. iter=iter+1
  6. return newton(a,iter)
  7. else:
  8. return a
  9.  
  10. # your code goes here
Success #stdin #stdout 0.01s 6944KB
stdin
Standard input is empty
stdout
Standard output is empty