Python Code For Gradient Descent Algorithm