Code to do Coursera homeworks