Here is my activity. Evaluate using a table
I know how to code it to have exact correct answers in a table but I do not know how to have it evaluate at any input a student may choose for their x value.
Here is my activity. Evaluate using a table
I know how to code it to have exact correct answers in a table but I do not know how to have it evaluate at any input a student may choose for their x value.
Try this in your table component.
f = simpleFunction(`2x+3`, `x`)
cellContent(1,3):
when isBlank(this.cellContent(1,1)) or isBlank(this.cellContent(1,2)) ""
when f.evaluateAt(this.cellNumericValue(1,1))=this.cellNumericValue(1,2) "β
"
otherwise "β"
You can also use the graph for the sketch that is on the screen already.
You guys are awesome! They both work great. Thank you so much
I might also add the suggestion to expand the second line so that it wonβt display the correctness until after they click outside of the cells for the coordinates. That will discourage them from fishing for a checkmark.
f = simpleFunction(`2x+3`, `x`)
cellContent(1,3):
when isBlank(this.cellContent(1,1)) or isBlank(this.cellContent(1,2)) or this.cellHasFocus(1,1) or this.cellHasFocus(1,2) ""
when f.evaluateAt(this.cellNumericValue(1,1))=this.cellNumericValue(1,2) "β
"
otherwise "β"
Do you always have to use a simple function when student input is not a numerical value? Is there a way to just check the input being something like x^{2}+5 ??