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