Index error :list out of range : <p>the problem statement is :</p>

<p>Given an array of integers, calculate the fractions of its elements that are positive, negative, and are zeros. Print the decimal value of each fraction on a new line.</p>

<p>Note: This challenge introduces precision problems. The test cases are scaled to six decimal places, though answers with absolute error of up to  are acceptable.</p>

<p>Input Format</p>

<p>The first line contains an integer,n, denoting the size of the array. 
The second line contains  space-separated integers describing an array of numbers .</p>

<p>Output Format</p>

<p>You must print the following  lines:</p>

<p>A decimal representing of the fraction of positive numbers in the array compared to its size.
A decimal representing of the fraction of negative numbers in the array compared to its size.
A decimal representing of the fraction of zeros in the array compared to its size.</p>

<p>A screenshot of my code has been attached.
<a href="https://i.stack.imgur.com/kuafq.png" rel="nofollow noreferrer">enter image description here</a></p>

<p>the error message says  File "solution.py", line 15, in plusMinus
    if arr[i] > 0 :
IndexError: list index out of range </p>

<p>help is much appreciated, thanks in advance.</p>
