I am having my struggling remote students write the equation of a linear equation from a graph in slope intercept form using a table.
So the fill the the table with the y-intercept, the slope, then finally they write the equation
I made it self checking, so I want it to accept equations that look like y=x+3 and y=1x+3. I can’t seem to figure out how to put in two correct answers for a table. Right now I have this:
cellContent(1,3): when table1.cellContent(1,2)=1“” otherwise “”
cellContent(2,3): when table1.cellContent(2,2)=-2“” otherwise “”
cellContent(3,3): when table1.cellContent(3,2)= y=1x-2“” otherwise “”
correct=
table1.cellContent(1,2)=1 AND
table1.cellContent(2,2)=-2 AND
table1.cellContent(3,2)=y=x-2or table1.cellContent(3,2)=y=1x-2
Better to use evaluations than latex matching. You can also use “this” to refer to the current component, and making variables for answer checks makes using correctness in multiple places a little cleaner:
Also, I didn’t explain… simpleFunction creates a function from input that is in either function notation or “y=”, or an expression, so it won’t accept any form (e.g. standard form of a line).