Programs repeat the same lines of code over and over again to build all sorts of things.
To build larger programs and websites, we repeat lines of code using a while loop.
To control the times a while
loop repeats, we start with a variable set to a number. We call this variable a counter vaiable.
Then, we use a comparision in the condition to compare the countere variable to a number. in this case, counter < 4.
Inside the code block, we make the condition return False and stop the loop by incrementing the counter variable.
>>> counter = 1
>>> while counter < 4:
... print(counter)
... counter += 1
...
1
2
3