What is wrong here?


#1



https://www.codecademy.com/courses/python-beginner-en-qzsCL/1/1?curriculum_id=4f89dab3d788890003000096#

This is a function designed to average elements of a list. "Oops, try again. average([3, 0]) returned None instead of 1.5 as expected."

Goal: return 1.5


def average(n):
    total=0
    for a in n:
        total+=a
    total=total/len(n)


#2

your function doesn't return anything, use the return keyword