Answer:
scores = []
total = 0
count = 0
highest = 0
lowest = 10
while True:
score = int(input("Enter quiz score: "))
if score == 99:
break
if score < 0 or score > 10:
print("Score must be between 10 and 0")
else:
total += score
count += 1
scores.append(score)
if score > highest:
highest = score
if score < lowest:
lowest = score
average = total / count
print("Scores:")
for s in scores:
print(s, end=" ")
print()
print("The highest score is " + str(highest))
print("The lowest score is " + str(lowest))
print("The arithmetic average is " + str(average))
Explanation:
*The code is in Python.
Initialize the values
Create an indefinite while loop. Inside the loop, ask the user to enter the quiz score. If the score is 99, stop the loop. If the score is smaller than 0 or greater than 10, warn the user. Otherwise, add the score to total, increment the count by 1, and add the score to the scores list. Then, determine the highest and lowest value using if statements.
After the loop, calculate the average.
Print the valid scores, highest score, lowest score and arithmetic average