Problem with 11.5


#1

Why the following codes, first one works and the second one can't be assigned to function call
def average(numbers):
total= float(sum(numbers))
total= total/len(numbers)
return total

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


#2

what exactly are you trying to do?

if you want to assign it to a function call change the name of the function def average11(numbers)


#3

Just want to know what's the difference, since it looks no difference to me


#4

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

you cannot do this stuff

you cannot assign the result directly to a variable

think of it like 2+2=var, there is no such thing

only var = 2+2