My homework code for Week 5