Newton Raphson Method In Python Code