Plus Minus in Python
Print the value of the fractions correct to 3 decimal places.


You didn't really do this part. You're just printing the full float. You can use str.format() to print to three places. With this syntax:

print "{:.3f}".format(count_positives / N)


The .3f syntax tells Python to print the first three digits only. Note that str.format will actually round the value, not just truncate it:

"{:.3f}".format(1.3449)
&gt;&gt;&gt; '1.345'


Though, since you're just printing the value by itself, you can use the format builtin where you pass the string and the format as a string.

format(count_positives / N, '.3f')


You don't need a filter to count the zeros. Lists have a built in count function which will return the number of times a particular object occurs in it. Like this:

count_zeros = ary.count(0)