Linear and non-linear equations

When a student submits a linear equation into the math input box, I want the feedback to say, “Great Job!” and when they don’t, I would like it to say, “Sorry, that is not a linear equation. Try again!”.

Then on the next slide I want the same thing but for a non-linear equation. I am at a loss as to how to do this.

Hi Julia,

Desmos CL has special methods for processing linear equations. Here’s how you can use that to do what you want:

In the Note component write:

content:

"Enter the equation of a line in the box below: ${result}"

result = 
when isDefined(xyLine(input.latex )) and input.submitted "\n\nNice one, that's a line!"
when input.submitted "\n\nNope, that's not a line."
otherwise ""

Then just have an equation input box below that, labelled “input”.

This will give the feedback you’re looking for. The key being the special xyLine thing there.
And then just reverse the logic on the other screen.

I did a quick activity for you: Linear or Not? • Activity Builder by Desmos

2 Likes