problem 6

My solution to problem 6