Arithmetic within a script

I guess I need longer examples- maybe full scripts to pull from. I am trying to set the window based on user inputs. I think I may need to define local variables, or I am not sure how to let the language know how to assign them a value. For now I might hack and do the calculations in the middle of this in the graph itself

#pull the mean and standard deviation from the user input
a = NormalCurve.number(“u”)
b = NormalCurve.number(“s”)

#calculate a good viewing rectangle
#this is where the trouble obviously is
#this is where the caution sign is
xlow = a-4b
xhigh = a+4b
ylow = -0.25/2b
yhigh = 1/2

#set the good viewing rectange
#this works to pass numbers, and a, or b
xmin : ylow
xmax : yhigh
ymin : ylow
ymax : yhigh

Actually it won’t work in a full screen graph. So, what I really need to make this work is a way to have two input areas- one for mean and one for standard deviation.

I would use a table to allow the user to input those two values.
Here’s a little example that might be helpful.

Thank you- that is a great way to get the inputs. I’ll work on doing the needed arithmetic on them.