week 1 and 2 programming exercise