count = int(input("How many grades? "))
above=0
grades = []
for i in range(count):
g = float(input("enter your grade: "))
grades = grades + [g]
#grades[i] = g #will NOT work unless we define grades = [-1]*count before
s = sum(grades)
avg = s/count
for gr in grades:
if gr>avg:
above = above+1
#Can replace the second loop with list comprehension:
#above_lst = [gr for gr in grades if gr>avg]
#above = len(above_lst)
print(above, "grades are above the average", avg)