Answer:
This program is as follows
<em>total = 0; count = 0</em>
<em>testscore = int(input("Score: "))</em>
<em>while testscore != 999:</em>
<em> if testscore < 0 or testscore > 100:</em>
<em> print("Out of range")</em>
<em> else:</em>
<em> total+=testscore</em>
<em> count+=1</em>
<em> testscore= int(input("Score: "))</em>
<em>print(count,"scores entered")</em>
<em>print("Arithmetic Average:",total/count)</em>
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:
<em> print("Out of range")</em>
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)