for loops enter number the square of your number is enter number the square of your number is enter number the square of your number is the loop is now done since the second and third lines are indentedpython knows that these are the statements to be repeated the fourth line is not indentedso it is not part of the loop and only gets executed onceafter the loop has completed looking at the above examplewe see where the term for loop comes fromwe can picture the execution of the code as starting at the for statementproceeding to the second and third linesthen looping back up to the for statement example the program below will print athen bthen it will alternate ' and ' five times and then finish with the letter once print' 'print' 'for in range( )print' 'print' 'print' 'the first two print statements get executed onceprinting an followed by nextthe ' and ' alternate five times note that we don' get five ' followed by five ' the way the loop works is we print cthen dthen loop back to the start of the loop and print and another detc once the program is done looping with the ' and 'sit prints one example if we wanted the above program to print five ' followed by five 'sinstead of alternating ' and 'swe could do the followingprint' 'print' 'for in range( )print' 'for in range( )print' 'print' '