results is defined as an Array - results = []. Then the average of alice is appended and the code expects number. When you write return results, an Array is returned. Try and define results = 0 and then just add to it in the loop.

What you have to do is make sure you indent the "return" line so it is only ONE indent away from the "def" statement above. NOT twice, because then it would be indented one away from the "for" statement, making the "return" as part of a loop.

You want the return statement to apply to the function, not inside the loop.!