Homework for week 6 of edX's intro to CS class