Can someone please explain why hackerrank does not accept this code for python?

def plusMinus(arr):

positive = "{0:.6f}".format(sum(1 for i in arr if i > 0) / len(arr))

negative = "{0:.6f}".format(sum(1 for i in arr if i < 0) / len(arr))

zero = "{0:.6f}".format(sum(1 for i in arr if i == 0) / len(arr))

return "\n".join([positive, negative, zero])

It gives me the error:

~ no response on stdout ~