Create Week 4 code

Week 4 code, almost works, problem with the loop