Need some help with "PART OF THE WHOLE"


Here is my code:

Have a mistake: Oops, try again. get_class_average([alice]) resulted in an error: 'list' object has no attribute 'average'

Thank you.


average() is a function call taking results as argument


It works. thank you:)


does it make sense why you do this?


Sorry. I have some problems with English.
what do you mean?


do you understand what you did?


Yes, I did.
Because average is a function.

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

And "results" is a list which we send to "average" function
return average(results)
Am i right?
Sorry for awful English


yes, very good :slight_smile: You understand


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