How to check if an equation in slope int form is correct?

Hello, I was wondering if anyone could help me check if an equation in slope intercept form is correctly written by students.
ex: y= 3x+2

I am giving them a graph and having them identify slope and y-intercept, then they have to write the equation in slope intercept form. I don’t know how to make the math input check if they wrote it in right and currently have to check it manually.

Thanks in advance.

Slide 4 on this activity might help.

1 Like

Thank you! It really did help.

I didn’t want to give back feedback since I am using this for a quiz but I like that I have something I can use to give feedback in the future.

I took the code from that feedback and used it for the correctness on the actual math input section, which I called q3.

myline=xyLine(q3.latex)
m=myline.slope
b=myline.yIntercept

good= m=0.75 and b=0

correct: good