Check on teacher dashboard

Hello,
I’m trying to have the students type in a direct variation equation (y=2x) based on a graph I provide and have it show me the check on the teacher dashboard if they’re correct.
Here is what I have so far but it’s telling me 'Could not find sink “correct”

myLine=xyLine(equation.content)
m=myLine.slope
check= m=2
correct: check

Any help would be great!

You were so close! This code should be in the CL for your Math Input and the first line should be:

myLine=xyLine(this.latex)

Thanks so much! One other questions. Another slide I just want the students to input 18 and it let me know if they’re correct. I though this would work but it’s not…

check=18
isCorrect = check

Thoughts?

Need to change to whatever your input is called, but this:

check = inputName.numericValue=18

You need to specify what should equal 18 to get a true/false.

(And just to verify, your graph will need to have readOnly: true to get the dashboard checkmark.)

Thank you both so much!