Secant Method In Python Code Generator