Table of Contents
Computers are particularly good at performing large numbers of repetitive calculations quickly and accurately. Suppose we need to perform the same calculations on a billion different inputs. One way we could achieve this is by writing a billion input statements, each followed by a statement which works on the latest input. Obviously, this wouldn't be very productive.
Loops, also known as iteration, provide a way to use the same statements repeatedly for different data.