This is an assignment exercise for the Data Scientist's toolbox on coursera.org.