https://numbas.mathcentre.ac.uk/question/44740/simon-s-copy-of-calculating-gradient.zip?