It's Okay to be Average


#1



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

I don't know what I'm doing wrong. The error message says "Oops, try again. average([3,0]} returned None instead of 1.5 as expected"


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


#2

You're not returning anything. Only printing.


#3

Oh, I get it. Thanks!


#4

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