Programming assignment 1 from the Coursera course taught by Michael Collins