Entered ordered pair, letting students know they are correct

Here is the code on my “Math Response” (has a title of SOLUTION):
p = parseOrderedPair(SOLUTION.latex)
sol_x = numericValue(p.x)
sol_y = numericValue(p.y)
check=sol_x=9 and sol_y=49
correct: check

The above code correctly shows a checkmark in the Dashboard.

I know to let the students know if they are correct or not, I have to now have a “Note” with some code in it. I’ve searched this forum and can’t get anything to work. Anyone have a suggestion to make this happen?

In your note, you can access the variable check by using SOLUTION.script.check

So something in the note’s CL similar to:

check=SOLUTION.script.check

feedback=when (check and SOLUTION.submitted) "That's correct!" when SOLUTION.submitted "Not quite" otherwise ""

should do the trick, if you then include the feedback variable in your note.

You can clean that up a slight bit:

feedback= when not(SOLUTION.submitted) ""
          when check "That's correct!"
          otherwise "Not quite."

Thank you both so much!