Módulo 4 de 18 · Diagrama de flujo
Loop flowchart
Loop execution flow
In the diagram above you can see the basic normal flow of a loop and how it executes. As you will find later, there are more than one types of loops, but all of them they work the same way.
At the beginning there is an initial state when the loop starts (for example we set a variable x = 1),
then always we check if a condition evaluates to true (in this case the condition is x < 100),
if this is true, then we execute some code we define.
After the execution of the code, we may update the value of x to 2.
Then we check the condition again ( x < 100 which is still true), execute the same code as before.
We update and continue these steps until the condition that is specified evaluates to false, this causes our loop to break and exit. (stop being executed in other words).