Secant Method In Python Code For Snake