In this lesson I want to build with you a flow chart example. I want to create a flow chart for a loop.

We initialize a count variable, and we “perform a task” for 10 times.

We increment the the count variable every time we execute the task, so to end the loop we check if it’s equal to zero.

Let’s start by defining this count variable:

the count variable

Then we create a conditional block, checking if count is equal to 10. If so, we’ll go down, and if not so, we’ll go right:

the conditional block

At this point we can add the additional logic. If the count is 10 we end the program, but until it’s not 10, we “perform a task” and then increment the count variable amount:

perform a task

Go to the next module