Answer:
This program is as follows
total = 0; count = 0
testscore = int(input("Score: "))
while testscore != 999:
if testscore < 0 or testscore > 100:
print("Out of range")
else:
total+=testscore
count+=1
testscore= int(input("Score: "))
print(count,"scores entered")
print("Arithmetic Average:",total/count)
Step-by-step explanation:
This initializes total and count to 0
total = 0; count = 0
This gets input for score
testscore = int(input("Score: "))
The following iteration stop when 999 is entered
while testscore != 999:
This prints out of range for scores outside 0 - 100
if testscore < 0 or testscore > 100:
print("Out of range")
Otherwise
else:
The total score is calculated
total+=testscore
The number of score is calculated
count+=1
Get another input
testscore = int(input("Score: "))
The number of score is printed
print(count,"scores entered")
The average of score is printed
print("Arithmetic Average:",total/count)