Check for slope-intercept form?

I’ve seen some discussions about checking slope intercept form. But the provided codes seem to check that the line is correct based on slope and intercept.
Example: This activity checks the slope and y-intercept Slope Intercept Form? • Activity Builder by Desmos Classroom
It shows correct for these formats:



@ASmith, to clarify, are you hoping to add code to check that the linear equation is in slope-intercept form? Indeed the currently linked activity checks that the line goes through the given points but does not check that it adheres to the requested form.

I think the best way to try to achieve this is using patterns. Please be advised that patterns are a beta feature and I’ve heard many warnings regarding checking for correctness using patterns. Nonetheless, I have edited the linked activity to only supply “YES!” feedback if the input goes through the points AND fits slope-intercept form. If the input goes through the points but does not fit the form, I supply a new detailed feedback saying that only the form is incorrect. If the input does not go through the points, then the feedback is just “try again.”

My check for the correct form may be a bit too strict depending on your needs. For instance, f(x) = 2x + 3 or any equation written using function notation would not be accepted even though technically correct.

Thank you! Yes, that is the aim: to check that students are using the correct form. Not as important at the beginning of the year when we are only using point-slope form. But later when we start switching between forms, we need to confirm they are responding with the correct form.
I look forward to looking at your example!

It was bothering me that my edited activity would not accept a slope-intercept linear equation that used function notation. I just edited the activity again to fix that. It now accepts inputs like f(x) = 2x + 3 and g(x) = 2x + 3 in addition to y = 2x + 3.