Eric Homework (First and Second Week)

I finally got this to work! These are the codes for the 1st and 2nd week.