For Loop is a bit more complex command. You give it a variable name, its initial value, its end value, and a step (increment). It is the same as if you:
iwith an initial value
i <= end
i = i + stepat the end of While
Let's write the same program as before, print first 5 numbers:
istart value to 1
iend value to 5
iin For body
We achieved the same result, but with a lot less code. Plus, it is more readable than before!
Nice job! This is the last Intermediate tutorial. You can continue learning with Advanced level tutorials.