week three coursera functional programming assignment