Gaussian Function in Python 2.7
<p>I need help making a program that calculates the Gaussian function <code>f(x)=1/(sqrt(2*pi)s)*exp[-.5*((x-m)/s)**2]</code> when <code>m=0</code>, <code>s=2</code>, and <code>x=1</code>.</p>

<p>Would it be just:</p>

<pre><code>def Gaussian(m,s,x):
    return 1/(sqrt(2*pi)s)*exp[-.5*((x-m)/s)**2]
print Gaussian(0,2,1)
</code></pre>

<p>I think you are missing <code>from math import sqrt</code>, <code>from math import exp</code> and <code>from math import pi</code> unless you didn't show it in your code.</p>

python python-2.7