exercise 10 and the funcode

exercise 10
the fun code is inclided because i ran it too see what it does.