Self Check Vertex Form

I am trying to have a self check for

The graph of the function y=x^{2} will be translated 2 units up and 4 units left. What is the resulting function​ g(x)?

I know I am off with
feedback =
when input1.script.correct “:white_check_mark:
otherwise “:x:
correct = this.latex = ‘y={x-4}^2+2’

1 Like

Checking for latex can cause issues. You could also look into pattern matching. The difficulty lies in telling students they are wrong when their math is essentially correct but not in the exact form. See the pic. Notice all the correct answers that may not be incorrect but a student could type in.

Countnumberusage would work well for this I think

I agree that checking against the latex can cause issues. Here is an example of what I would do. The code I used is what I found after doing lots of research about checking correct equations.

1 Like

I agree with the fragility of latex noted by others. That said, the mistake in the latex is the use of curly braces. They should be parentheses (and the exponent in curly braces):

`y=(x-4)^{2}+2`
1 Like