Coursera Programming Languages Homework 6