def f (x): return (x**2-5) a = 0 b = 3 while abs(b-a)>=10**-6 : c = (a+b)/2 if f(c)<0 : a = c else : b = c print (C)
To embed this project on your website, copy the following code and paste it into your website's HTML: