the while loop keeps looping while its condition is true (which is the reason for its name)but what if you want to execute block of code only certain number of timesyou can do this with for loop statement and the range(function in codea for statement looks something like for in range( )and includes the followingthe for keyword variable name the in keyword call to the range(method with up to three integers passed to it colon starting on the next linean indented block of code (called the for clauselet' create new program called fivetimes py to help you see for loop in action print('my name is'for in range( )print('jimmy five times (str( ')'you can view the execution of this program at the code in the for loop' clause is run five times the first time it is runthe variable is set to the print(call in the clause will print jimmy five times ( after python finishes an iteration through all the code inside the for loop' clausethe execution goes back to the top of the loopand the for statement increments by one this is why range( results in five iterations through the clausewith being set to then then then and then the variable will go up tobut will not includethe integer passed to range(figure - shows flowchart for the fivetimes py program when you run this programit should print jimmy five times followed by the value of five times before leaving the for loop my name is jimmy five times ( jimmy five times ( jimmy five times ( jimmy five times ( jimmy five times ( note you can use break and continue statements inside for loops as well the continue statement will continue to the next value of the for loop' counteras if the program execution had reached the end of the loop and returned to the start in factyou can use continue and break statements only inside while and for loops if you try to use these statements elsewherepython will give you an error