C1M4 Exercise 4 Candy Help

I’m struggling with exercise 4 and get_top_candies. For the mean I used stats. and the hint tells me I should be using a dot. But isn’t get_top_candies already defining the >= function for average popularity? So how would I even use stats.?

[mentor edit - code removed]

Every time you open a notebook to work on it, you must run all of the cells starting from the top.

I notice the cell counter is fairly high at “[39]” ,so I recommend you use “Kernel → Restart and clear all data” and then use “Cell → Run All”.

To add to what @TMosh said, you are on the right track, but both functions get_top_candies and display_pretty_table are imported from ex4_helper_functions. Since you have imported ex4_helper_functions using the “import file_name” format, you then need to use it as file_name.function_name. I hope this helps.

Also, per the forum guidelines, please only share the error you are getting rather than your code. I have deleted the screenshot.