Oops, try again. average seems to be missing.

CAn anyone see what i've done wrong?

```
# Add your function below!
def avarage(numbers):
total = sum(numbers)
total = float(total)
total = total/len(numbers)
return total
print avarage
```

Oops, try again. average seems to be missing.

CAn anyone see what i've done wrong?

```
# Add your function below!
def avarage(numbers):
total = sum(numbers)
total = float(total)
total = total/len(numbers)
return total
print avarage
```

I've just completed that section myself.

It looks like your total calculated in the third line doesn't include a float function.

As you've not applied the float to your numerator, the final result is rounded down to an integer

So to solve it, you'd need to apply your float to the total in this line too, i.e.

`total = float(total)/len(numbers)`

Does that make sense?

Here's what worked for me

```
def average(numbers):
total = sum(numbers)
return float(total)/len(numbers)
```

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.