my code (i'm just using the added bit to save scrolling time )

## Add your function below!

def average(numbers):

-----total = float(sum(numbers))

result = total / float(len(numbers))

return result

is returning the following error

File "python", line 24

SyntaxError: 'return' outside function

however, when I do this

## Add your function below!

def average(numbers):

-----total = float(sum(numbers))

result = total / float(len(numbers))

----return result

or this

## Add your function below!

def average(numbers):

-----total = float(sum(numbers))

result = total / float(len(numbers))

-----return result

it returns

File "python", line 24

return result

^

IndentationError: unexpected indent

any help?