Checking a coordinate pair in a table

Hi there. I’m a complete newbie and was wondering if anyone could help. I want the kids to enter their own equations into a table and have them graphed. All good, works fine.

Then I want them, in another column of the table, to enter the y-intercept and have a check mark come up if it is correct.

The problem seems to be with the b_2 below
correct2= myPoint2.x=“0” and myPoint2.y=“b_2”

If, instead of “b_2”, I have “3”, for example, then it works. Can I change it such that it will work for whatever equation they put in?

Many thanks.

Yes, you can do that! You could set your variable b_2 and the others to use the CL code xyLine. Also in your checking statement, the variable should be placed in brackets like ${b_2}. Here’s what it could look like:

correct2= myPoint2.x="0" and myPoint2.y="${b_2}"

b_2= xyLine(this.cellContent(2,1)).yIntercept
1 Like

That’s perfect.
Thank you so much!!