Here's my code
#Gets a list of numbers from user
def get_score():
score_list = []
keep_going = 'y'
while keep_going == 'y':
score = float(input('Enter a test score: '))
while score < 0:
print('Positive numbers only')
score = float(input('Enter a test score: '))
score_list.append(score)
keep_going = input("More scores (y/n) ")
return score_list
#Finding the average based on user's input
def calculated_average():
numbers_of_grades = float(input)
score_list = [int(s) for s in score_list]
average = sum(score_list) / len(score_list)
return average
def main():
score = get_score()
average = calculated_average(score)
main()
I'm trying to find the average grade based on the user's input, but it looks like there's something wrong at the calculating average part. I can't seem to figure out how to get the sum of the score_list. Any help is appreciated thanks!