"""
Exercise 1.10: Evaluate a Gaussian Function
"""
from math import pi, exp, sqrt
m = 0
s = 2
x = 1
y = (1 / (sqrt(2 * pi) * s)*exp((-1/2) * (((x - m)/s) ** 2)))
print(y)
'''
Sample run:
y = 0.176032663
'''
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter