I’m wondering if there is a way to check the formatting of an input for an ordered pair. I did set up initialLatex to clue them in, but…
You can use something along the lines of isUndefined(parseOrderedPair…) that worked for me in a note
p=parseOrderedPair(exp2.latex) number("x_1"):numericValue(p.x) number("y_1"):numericValue(p.y) content:when isUndefined(graph2.script.p) "enter a coordinate pair in the form (x,y)" otherwise ""
Do you have an example activity for this?
This is exactly what I was looking for. I’m trying to have students identify the coordinate of parabolas and make the connections to Vertex Form with the point. The problem is, I can’t get the original note to display. The coding is overwriting the previous content. Is there a particular way to input it in the coding so I can display both?
This helped me, but I want to also check for the correctness of a specific coordinate, say (-2,4).
Could y’all please help with that part?
If I understand your question correctly, after checking the coordinates are in the appropriate format, you want to then check that the coordinates entered match a specific coordinate?
If so, just check the numbers “x_1” and “y_1” against your specific coordinates. For example, checking against your proposed (-2,4):
content:when isUndefined(graph2.script.p) “enter a coordinate pair in the form (x,y)”
when graph2.number(“x_1”)=-2 and graph2.number(“y_1”)=4 “Your message here.”
I appreciate the prompt reply and help!
Thanks! That did it!