 Every athlete knows that you get good by practicing, by repeating the same moves until you get really good, or until you reach your goal. When I was in high school, I wouldn't leave practice until I made ten free throws in a row. Similarly, when you get to a computer program and repeat a command, you can give it an exact number of times to repeat, or you can define a goal and tell it to repeat the command until it reaches some goal.