[ create a new paste ] login | about

Project: python
Link: http://python.codepad.org/1eKeUESP    [ raw code | output | fork ]

Python, pasted on Oct 11:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pcount=0
ncount=0
zcount=0
for i in range(0,n):
    if(arr[i]>0):
        pcount=pcount+1
    elif(arr[i]<0):
        ncount=ncount+1
    else:
        zcount=zcount+1
pcountfr=float(pcount/n)
ncountfr=float(ncount/n)
zcountfr=float(zcount/n)
return(pcountfr)
return(ncountfr)
return(zcountfr)


Output:
1
2
3
  Line 14
    return(pcountfr)
SyntaxError: 'return' outside function


Create a new paste based on this one


Comments: