问题描述:
Write a function to find the ration of zeroes in an array of integers.

测试用例:
['assert zero_count([0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8])==0.15', 'assert zero_count([2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8])==0.00', 'assert zero_count([2, 4, -6, -9, 11, -12, 14, -5, 17])==0.00']

生成的代码:
def zero_count(arr):
    zero_count = 0
    for num in arr:
        if num == 0:
            zero_count += 1
    total_length = len(arr)
    return zero_count / total_length

# Test cases
assert zero_count([0, 1, 2, -1, -5, 6, 0, -3, -2, 3, 4, 6, 8]) == 0.15
assert zero_count([2, 1, 2, -1, -5, 6, 4, -3, -2, 3, 4, 6, 8]) == 0.00
assert zero_count([2, 4, -6, -9, 11, -12, 14, -5, 17]) == 0.00