#Loop FOR - only works for counter-controlled repetition #write a program that reads 10 integers and finds the sum and average of #inputs def main(): sum=0 for i in range(10): #i=0, 1, 2, ...9 - loop executes 10 times num=int(input("enter number ")) sum=sum+num #update of i will happen authomatically #you don't need i = i + 1 #same using loop WHILE #i=0 #sum=0 #while(i<10): # num=int(input("enter number ")) # sum=sum+num # i=i+1 average=sum/10 print(sum, average) main()