How to Check Algebraic Representation for Dilation

Hello! I am creating an activity where students must input the algebraic representation for a 2D figure that is dilated on the coordinate plane. I have an initial latex that shows "(x, y)→ " and students’ responses would be something like “(x, y)→ (2x, 2y)”. I want to check for correctness and provide feedback but I am getting stuck.

Any suggestions on how to do this?


Can they type (2x, 2y) in a separate cell? If so, you can use parseOrderedPair to extract the x and y coordinates (in this case, 2x and 2y) and then use patterns to match them against the answer.

If you try to have it parse the entire expression with the arrow in it, I don’t know how that would work.