My Question is: If the loop statement terminates immediately why is the print(counter) statement being executed?
In the course section for Continue: Loop iteration the following program was given:
counter = 0
while counter < 10:
counter += 1
if counter == 3:
print (“Outside the loop!”)
And the expected output was given as
Outside the loop!
The definition/explanation for a ‘continue’ statement was
" continue : It immediately terminates the current loop iteration. Execution jumps to the top of the loop, and the condition is re-evaluated to determine whether the loop will execute again or terminate."