K. So
In your function, as Wavic said, if you are using the
Also you want to divide total by the length of scores, not score.
Finally you need to convert your input to an
Assuming you don't need any input validation this will do it:
Try to make these changes and post your code.
Also let us know if there is an error and how your program is behaving.
scoreCalculator(scores)
should not be in the while loop. That needs to be unindented.In your function, as Wavic said, if you are using the
sum
builtin you don't need the for
loop. So total = sum(scores)
would do it.Also you want to divide total by the length of scores, not score.
Finally you need to convert your input to an
int
.Assuming you don't need any input validation this will do it:
number = int(input("Enter a score (0 - 10) -> "))
Try to make these changes and post your code.
Also let us know if there is an error and how your program is behaving.