Implemented programming question for the Week 6