Completed exercises for loops