• + 7 comments

    In Python3 passes all test cases

    def plusMinus(arr):
        # Complete this function
        positive = sum(x > 0 for x in arr) / len(arr)
        negative = sum(x < 0 for x in arr) / len(arr)
        zero = sum(x == 0 for x in arr) / len(arr)
        
        print(positive, negative, zero, sep="\n")