It's ok to be average


#1

Someone could help me with this result?


#2

Could you elaborate on "help"?

We could guess, but it's better if you explain what you want to know.


#3

a function call requires parentheses: average(), and between the parentheses you need to supply an argument since the function has a parameter


#4

By printing average in this manner, Python is telling you what it knows about the object: it's class, and its location in memory. What we need to be doing here is invoking the function on any one of the lists contained in the dictionaries above.

print average(lloyd['homework'])

Of course, that is assuming the lesson asks us to print anything. Your average function looks correct, and ready for the next step so check the instructions again, and print only if asked to, else move to the next lesson.


#5

Thank you. In the future I will address more properly the questions. I understood why the command print print the location in memory.


#6

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