summaryrefslogtreecommitdiff
path: root/progs/a500.py
blob: 3c60a5d9a42f959742d5534b7d5662c2cefc5a1c (plain)
1
2
3
4
5
6
7
8
9
10
from array import array
def zero_count(nums):
    n = len(nums)
    n1 = 0
    for x in nums:
        if x == 0:
            n1 += 1
        else:
          None
    return round(n1/n,2)