def F(x): y=x**2+3*x-1 return y def Encadrement(): a=0 b=1 for k in range(1,11): m=(a+b)/2 if F(m)*F(a)>=0: a=m else: b=m return a,b