from math import*
def f(x):
    return x*0**x-1

def méthode_1(a,b,n) :
    for i in range(n):
        m= (a+b) /2
        if f(a)*f(m)<0:
            b=m
        else :
            a=m
    return [a,b]

def nombre_dérivé_approché(a) :
    h=1e-10
    return (f(ath) -f(a))/h

def méthode_Newton(n) :
    X=1
    for i in range(n):
        X=x-f(x)/nombre_derivé_approché(x)
    return x
    
def comparaison(n):
    a=méthode_1(0,1, n)[0]
    b=méthode_1(0,1,n)[1]
    i=0
    while ... or ... :
        i=i+1
    return x

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: