
def somme_car(X,Y,a,b):
    n=len(X)
    S=0
    for i in range(n):
        S=S+(Y[i]-(a*X[i]+b))**2
    return S


def Recherche_couple():
    X=[1,2,3,4,5]
    Y=[2.78,3.27,3.52,3.77,3.97]
    A=0;B=2
    S=somme_car(X,Y,A,B)
    for k in range(1,101):
        a=k*0.01
        for j in range(1,101):
            b=...
            if somme_car(X,Y,a,b)<S:
                S=somme_car(X,Y,a,b)
                A=a ; B=b
    return A,B












