def f(x): return 7/(3*x)-1 def newton(f,x0,e,h): x = x0 while abs(f(x))>e: d = (f(x+h)-f(x))/h #on calcule une approximation du nombre dérivé en x x = x-f(x)/d return x