Why do I get None as a result : <p>I have the following script:</p>

<pre><code>import math
scores = [3.0,1.0,0.1]
sum = 0
i=0
j=0

for s in scores:
    sum = sum + math.exp(scores[i])
    i=i+1

def myFunction(x):
    math.exp(x)/sum

for s2 in scores:
    print(myFunction(scores[j]))
    j=j+1
</code></pre>

<p>But, the output I get is:</p>

<pre><code>None
None
None
</code></pre>

<p>Why is that? How can I retrieve the correct values?</p>

<p>Thanks.</p>
