print('my name is'looping for in range ( print('jimmy five times (str( ')'done looping end figure - the flowchart for fivetimes py as another for loop exampleconsider this story about the mathematician carl friedrich gauss when gauss was boya teacher wanted to give the class some busywork the teacher told them to add up all the numbers from to young gauss came up with clever trick to figure out the answer in few secondsbut you can write python program with for loop to do this calculation for you total for num in range( )total total num print(totalthe result should be , when the program first startsthe total variable is set to the for loop then executes total total num times by the time the loop has finished all of its iterationsevery integer from to will have been added to total at this pointtotal is printed to the screen even on the slowest computersthis program takes less than second to complete (young gauss figured out way to solve the problem in seconds there are pairs of numbers that add up to and so onuntil since is , the sum of all the numbers from to is , clever kid!flow control