# Computing the Average - Why do they tell you to put wrong argument?

#1
``````
grades = [100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5]

total = 0
for score in scores:
total += score

def grades_average(grades_input):    # THIS IS THE PART

``````

So normally in the instructions you want to follow what they say to put in for the argument especially when it is highlighted. Not this time though. The code above returns the correct answers but I don’t get the check mark. It says

grades_average([8, 6, 8, 3, 4, 6]) returned 174.25 instead of the expected: 5.833333333333333

I assume I am missing something as to how this site works in terms of instructions but my code printed

1045.5
80.4230769231

this is the same result if I change my code to get the green check mark to move on:

new code

``````grades = [100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5]

total = 0
for score in scores:
total += score

def grades_average(grades):   # THIS IS THE PART

``````

Why do I have to put ‘grades’ instead of the grades_input like they request when both yield the same result?

#2

If `grades_input` is the expected parameter, then use it inside the function so it is re-usable and not dedicated to the global object, `grades`.

Length is a counting number, so the float declaration should go on the numerator which could feasibly be a float.

``````return float(grades_sum(grades_input)) / len(grades_input)
``````

An even better place to delcare the float would be in the dependency, `grades_sum`.

``````total = float(0)
...
Now total will return as a float so does not need to be redeclared in `grades_average`.
``return grades_sum(grades_input) / len(grades_input)``