Oct-24-2019, 11:53 PM
I am attempting to write a short practice script that finds the average of a user defined number of scores.
Here is the code I have:
Can anyone tell me what I'm doing wrong?
Here is the code I have:
total = int(input('How many scores are there? '))
total_sum = 0
for i in range(total):
Scores = float(input('Enter a score : '))
total_sum += Scores
avg = Scores / total_sum
print ('The average of the scores is: ', avg)My goal is for this to calculate the average but it doesn't seem to be doing that. What it's doing is calculating something else. No matter how I change it up it keeps giving me odd answers. Can anyone tell me what I'm doing wrong?
