Presenting our first control structure. Ordinarily the computer starts with the first line and then goes down from there. Control structures change the order that statements are executed or decide if a certain statement will be run.
Here's the source for a program that uses the while control structure:
three tables in while loop
a = 0 # FIRST, set the initial value of the variable a to 0(zero).
while a < 31: # While the value of the variable a is less than 10 do the following:
a = a + 3 # Increase the value of the variable a by 1, as in: a = a + 1!
print(a) # Print to screen what the present value of the variable a is.
# REPEAT! until the value of the variable a is equal to 9!? See note.