Check solution set with a button

Hello, I’d like to have my students check the solution set to a question when it’s of the form x={1/3. -2}. I understand the code for checking them as two separate things, but I want them to be in the practice of writing their answers as a solution set.

Any help would be appreciated!
link to my activity

Desmos’ calculator doesn’t recognize this notation, so latex matching is your best bet. Most people type what they expect as an answer into a math input in preview mode, then copy-paste it into the CL. So for the above (I assume you intended a comma) I would use:

check= this.latex=`x=\left\{\frac{1}{3},-2\right\}`
correct: check

Using backticks instead of quotes will resolve any extra spaces. Latex matching is just more fragile than evaluative methods, but (unless there’s someone with a creative solution) there’s no way to finagle it to evaluate anything because of the notation.