Exercise 1: gradient descent

Here's my stab at gradient descent.

I messed something up though as the $\theta$ values I get at the bottom don't make any sense.