Program exercise for NG's machine learning course in coursera.