Desmos: Brief Update

NOT BASEBALL

See student.desmos.com with code MZFZHF to see the result of playing with the computational layer in Desmos.

I have to give them a thumbs up for scanning social media and seeing my dilemma and pointing me to their site and replying within a few hours when I was stuck. The documentation on how to do arithmetic is a little sketchy. I eventually figured out to use the simpleFunction function.

Here is how I coded the graph:
#pull the mean and standard deviation from the user input
table=MeanSD
themean = table.cellNumericValue(1,1)
thedeviation = table.cellNumericValue(1,2)

#drop mean in as u and standard deviation in as s
number(“u”) : themean
number(“s”) : thedeviation
lowest=simpleFunction(“a-4b”,”a”,”b”).evaluateAt(themean,thedeviation)
highest=simpleFunction(“a+4
b”,”a”,”b”).evaluateAt(themean,thedeviation)
lowly=simpleFunction(“a/b”,”a”,”b”).evaluateAt(-0.125,thedeviation)
highly=simpleFunction(“a/b”,”a”,”b”).evaluateAt(0.5,thedeviation)

#set the good viewing rectange
bounds: makeBounds(lowest, highest, lowly, highly)

Here is how I coded the table:

initialCellContent(1,1):”700″
initialCellContent(1,2):”25″
Eventually I should put in error checks to confirm data types and the like, but enough for now.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s