solution for loops exercise 4