Loops Introduction Exercises

  1. With your neighbor, determine what is displayed (if anything) when the following code is interpreted:
    startNum = 10
    
    for num in range(startNum, 0, -1):
        print( num, "...")
    print( num, "!", sep='')
    
  2. With your neighbor, identify the following and how they relate to the the code above:
    1. Loop variable
    2. Loop body
    3. Iteration(s)
  3. Draw a flowchart for a generic for loop. flowchart