#Loop While - repetition #Write a program that prints Hello 10 times #Each execution of the loop we call - ITERATION def main(): print("Version 1") counter=1 while(counter<=10): #Loop Body print("Hello") counter=counter+1 print("After loop counter is", counter) print() print("Version 2") counter=10 while(counter>=1): #Loop Body print("Hello") counter=counter-1 print("After loop counter is", counter) print() print("Version 3") #Modification - prints Hello the number of times user specifies times=int(input("How many times you would like to print? ")) counter=1 while(counter<=times): #Loop Body print("Hello") counter=counter+1 print("After loop counter is", counter) print() print("Version 4") #Same problem as above using only one variable times in loop #condition times=int(input("How many times you would like to print? ")) while(times>0): #Loop Body print("Hello") times=times-1 main()