Solution for the Coursera data science Assignments (https://class.coursera.org/datasci-002)