Check Answer for "non-numericvalue"

I’m somewhat new to CL and slowly making my way through learning all the cool things from tons of cool people out there posting their activities. I’m having a little trouble on slide 4 figuring out how to make the submit button accept the answer or either 5,21 or 21,5. I’m not sure how to set up the latex/code for it. Any help would be much appreciated!

Thanks bunch in advance!

Here is the link for my activity: P.7 Solving Equations • Activity Builder by Desmos

You could use countNumberUsage( ). First line checks if your button was recently pressed. The next two check if 21 and 5 are each used once. The last checks if there are only two numbers used. In your CL

check = this.timeSincePress( ) > 0  
            and countNumberUsage(inputName.latex,21) = 1
            and countNumberUsage(inputName.latex,5) = 1
            and countNumberUsage(inputName.latex) = 2

If you just want the checkmark for the dashboard, you can change check= to correct:. Otherwise, you can add another line correct: check in case you want to use check to give other feedback (like conditional content in a note).

1 Like

Watch out, that’ll accept -5 and -21 as correct answers.

Thank you so much for getting back to me guys, I really appreciate it!
Daniel I tried inputting that into my note and kept getting this error.


I must be missing something. Sorry for being a little slow with all of this!

I also tried messing around by doing this but it didn’t work either:
I added this into my note CL:


then added this into my math input CL:
image

When I hit the submit button it doesn’t do anything

Messing around with it some more I was able to figure out what I was doing wrong. Only thing I can’t seem to figure out is how to hold back the feedback of yes or no until the students hit the submit button on slide 4

Thanks in advance for all of this!

That was the intent of timeSincePress >0 if you had a separate button. Since it’s the submit button for the input, you can use …input.submitted and

parseOrderedPair accepts latex in the form (x,y), so if a student uses x= as you directed in other slides it won’t work. pair2 should work fine if they enter #,#. (I tried using parseEquation, but it didn’t work either.

And this should work fine once you’ve got your input figured out: