Adding an extra space to coordinate point in math input

I have an activity where the students have to find the missing coordinate in a solution to a linear equation. I’m programming feedback to pop up depending on their answer.

I’d like them to be able to enter just the missing coordinate OR the entire coordinate point. However, I’m anticipating that some of them might add an extra space in between the (-6, 8) and I’d like the code to recognize that as a correct answer. Unfortunately, I can’t use the \\ for the extra space because it’s in parentheses. So x and y are showing up as correct answers, but z is not.

x=this.submitted and this.latex="-6"
y=this.submitted and this.latex="\left(-6,8\right)"
z=this.submitted and this.latex="\left(-6,\\ 8\right)"

Any ideas on how to fix this issue? Thanks in advance!

myPair=parseOrderedPair(this.latex)
xCoord= this.submitted and myPair.x=-6
yCoord= this.submitted and myPair.y=8
correct:xCoord and yCoord

Thanks for your help! When I try to use that, it doesn’t like lines 2-4. I get the error “Objects of different types are never equal (in this case latex and number”

Here is the screen that I’m working on. I’ve commented out the code that I previously used.

Sorry I always forget that:

myPair=parseOrderedPair(this.latex)
xCoord= this.submitted and numericValue(myPair.x)=-6
yCoord= this.submitted and numericValue(myPair.y)=8
correct:xCoord and yCoord
1 Like

The \\ is deprecated in Desmos, so change to this:

z=this.submitted and this.latex=" `\left(-6,\ 8\right)` "
correct:x or y or z
1 Like

That works! Thank you so much!