Assessing atudent nput

Is there a way to code the input or notes box where a student writes an expression, like “f(x)=3x+5” and the activity can assess and report if that is the correct function or not. For instance, if it was the wrong function then they couldnt hit the submit button, or a text will appear saying incorrect. Only the right input will allow them to submit or get the “correct” text to appear.

Will your function be linear? If so, you can use xyLine to check if the slope and y-intercept are matching. There’s a few posts with examples if you search “xyLine” on this site.

1 Like

Outside of linear you’ll want to use parseEquation.

If its linear, totally agree xyLine is the most reliable

1 Like

What if the equation involves combinations of symbols that are not recognized? For example f^{-1}(x) “f inverse of x”.

It’ll only recognize f as a variable in this situation. So, you could do some things keeping that in mind to get the info you want, but Desmos won’t recognize it as intended. You can see my example activity where I tricked desmos to allow function notation.