Im trying to write a program that will determine the average of a number tests. The number of tests will vary, but I do not want it to be initially set by user input. I'm want to use a while loop and a sentinel value of zero to stop the input. I would like the average to display to three decimal places, with the % symbol immediately following the final digit as shown below...
Enter test score 80
Enter test score 70
Enter test score 90
Enter test score 88
Enter test score 0
The average is 82.000%

total =0
counter = 0
While True:
    entry = int(input('Enter test score:'))
        total += entry
        counter +=1
  if entry == 0

print('The average is', (total / counter))

This is what I have so far. I'm not even sure that is right.


i would place this:

total += entry
counter +=1

inside the for loop, the print is then simple total / counter. why is there no counter = 0 just like there is total = 0