solution for the Coursera Data Science Assignments