Question: computer class assignment... using the program thonny! plz try to answer asap Question 1 [10 points] The Gaussian function is one of the most widely
Question 1 [10 points] The Gaussian function is one of the most widely used functions in science and technology. The two-dimensional Gaussian function can be expressed as follows: z.) . (y v.Y, 20% f(z,y) = A exp(-(S %3D 203 where the parameters A, ro, Yo, Ox, oy are real numbers. Write a function gaussian 2D that takes in parameters z, y, A, xO, yO, sigmaX, sigmaY, evaluates the Gaussian with those parameters, and returns the result. Then, outside the function, ask the user to enter in values for each of the seven parameters, call the function with those parameters, and print the result to the screen. where the parameters A, zo, Yo, Ox,Oy are real numbers. Write a function gaussian 2D that takes in parameters z, y, A, rO, yO, sigmaX, sigmaY, evaluates the Gaussian with those parameters, and returns the result. Then, outside the function, ask the user to enter in values for each of the seven parameters, call the function with those parameters, and print the result to the screen. Filename You must write this program in a file called gaussian.py. User input Seven numerical values, one for each parameter: z, y, A, z0, yO, sigmaX, sigmaY. (You can assume the user will always type in a number.) Examples (as executed in Thonny) EXAMPLE 1: >>> %Run gaussian.py Enter value for x: 0.5 Enter value for y: 0.5 Enter value for A: 1 Enter value for x0: 0 Enter value for y0: Enter value for sigmaX: 1 Enter value for sigmaY: 1 0.7788007830714049
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
