# zeri.py def zero (f,a,b): x=(a+b)/2.0 if x==a or x==b: return (a,b) y=f(x) if y==0: return (x,x) if y>0: return zero(f,a,x) return zero(f,x,b)