Programming Exercise 1

My solution the programming exercise 1 of Machine Learning Course on
Coursera