#Write a program that first reads the number of students in the class, #then reads the grade for each student. The program finds the average grade in #the class. #this is a counter-controlled repetition. #the loop will iterate size times size=int(input("size of the class - number of students in the class ")) i=1 sum_grades=0 if(size>0): print("enter grades for", size, "students") while(i<=size): #i=1, 2, ....till i=size the statement will be True and #the loop will iterate size times #print("enter grade for student",i) grade=int(input("")) sum_grades=sum_grades+grade i=i+1 #if(size>0): print("average grade", sum_grades/size) #else: #print("empty class or invalid input") else: print("empty class or invalid input")