I am trying to count the number of 0's, positives, negative numbers in array. I have explicitly converted every string to integer here:
k = []
n = int(raw_input())
p=neg=z=0
p = int(p)
neg = int(neg)
z = int(z)
for i in range (0,n):
numb = int(raw_input("numb: "))
if numb==0:
z +=1
if numb<0:
neg+=1
if numb>0:
p +=1
k.append(numb)
print "Array: ", k
print '%.5f' %z/n
print '%.5f' % neg/n
print '%.5f' %p/n
It keeps giving me this error: unsupported operand type(s) for /: 'str' and 'int'.
print '%.5f' % (p/n).