Secant Method Algorithm Python