solution for loops exercise 2