complete 'Loops' exercise 3