human
I am working on the file "@Crash+Course+v0.63.ipynb".
The first task is:
But what if you need a function with only one argument, like f(x) rather than f(x,y,z,...)? You can do this with Factory Functions:
Can you write Python program for it?
assistant
#Here if you need a function with only one argument, like f(x) rather than f(x,y,z,.

def gauss_maker(A,a,x0):
    def f(x):
        return A*np.exp(-a*(x-x0)**2)
    return f

x = np.linspace(0,1)
g = gauss_maker(99.0,20,0.5)
plt.plot(x,g(x))