Coordinate assessment for correctness

I was thinking of ways to check for correctness for inputted coordinates. One way was just assigning a solution to be equal to the written out coordinate

[solution1="(2,3)" ]

but this opens the door for having to write out the solution different ways in case someone wrote a space. I was thinking of trying it this way:

i=input3.latex
correct= when countNumberUsage(i)=2 and countNumberUsage(i,2)=1 and countNumberUsage(i,3)=1 “yes” otherwise “no”

content: "write the coordinate (2,3)

${correct}"

and this way works great, but they can write the coordinate backwards and still get it correct. Any suggestions?

Try using parseOrderedPair.

i=input3.latex
correct = when parseOrderedPair(i).x = 2 and parseOrderedPair(i).y=3 "yes"
          otherwise "no"