solution for Loops exercise 1