loop
used for when programmers want a statement to execute repeatedly
nested loop
a loop that is found inside a loop
while loop
while the condition is true the loop continues to execute, otherwise it exits the loop
infinite loop
the loop isn’t structured correctly, or there is an error in the logic which causes the loop to execute forever
for-loop
The condition is first checked to see if it is true, the statement will execute, and the steps will continue to repeat in the loop until the statement becomes false, then the loop ends
definite iteration
loop continues for a known amount of time
indefinite iteration
loop continues for an unspecified number of times, could be forever
example of until when
n = 0
while n < 10:
n = n+1
print(n, ”Computers”)