11.5 It's Okay to be Average (alternative solution)


#1

So I know that this is the right answer

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

But why doesn't this work? I know it's one extra step but I'm curious as to why it doesn't work.

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


#2

in here do somethings but not change nothing, should change to:
total /= float(len(numbers))

** remember, instructions check that says, if want from you to use result, you must use result variable to pass the course