Loop statements are another type of control used in programming that allow programmers to interrupt the structural flow of a program. Looping statements allow a program to repeat a set of instructions for a predetermined number of times or until a specified condition is met. The common loops that are used are as follows:
- For loop
- While loop
- Do while loop
- Nested loop
For this assignment, you will complete the loop template, as follows:
- Download the Loop Template by clicking here.
- Examine the loop statements in the Code Sample column of the template.
- Identify the loop type used in the Loop Type column of the template.
- In the Explanation column, answer the following:
- What does this loop do?
- When would this loop be used?