import Root Y=10 def f(x): return x**2-Y # print Root.bisection(f,0,Y,1e-10) #print Root.falsepos(f,0,Y,1e-10) print Root.newton(f,-Y,0,1e-10)