def gradientDescent(X,Y,max_steps=100,n=0.1):
theta = np.zeros((2,))
error_list = []
for i in range(max_steps):
grad = gradient(X,Y,theta)
e = error(X,Y,theta)
error_list.append(e)
theta[0] = theta[0] - n*grad[0]
theta[1] = theta[1] - n*grad[1]
return theta,error_list