1.
Q16: What is the output of the following loop if the user input is: 10, 20, 30, 35, 40, -1
print("Enter a negative score to signal the end of the input.")
total = 0
count = 0
score = int(input("Score: "))
while score >= 0:
count += 1
total += score
score = int(input("Score: "))
print(total/count)
- 27.0
- 27
- 22.5
- 22
- Runtime error