Checking Correct Tables

I am making an activity where students graph parent functions by putting points in a chart. I’d prefer for the regression line to not show up until an action button is clicked, but I couldn’t make it work out.

So I changed it so that the first screen just gives the points, and the second screen tells you a) you’re correct, b) you need to fill out the full table, or c) it’s not right yet and briefly displays the correct line.

My problem is that the code works for some points but not all, and I can’t find the common theme on what is incorrect. For example, if I’m inputting a points for y = x, I put (-3, -3); (-2,-2); (-1, -1); (0,0); (1,1); (2,2) it works fine. If I put (-2,-2); (-1, -1); (0,0); (1,1); (2,2); (3,3) however, it kicks back as incorrect. My students ran into a similar issue on a different activity last year and I couldn’t come up with an answer. Thoughts?

Activity found here: Graphing Parent Functions • Activity Builder by Desmos

I have the same issue when checking quadratics:
(-2,4); (-1, 1); (0,0); (1,1); (2,4); (3,9) works fine.
(-3,9); (-2,4); (-1,1); (0,0); (1,1); (2,4) comes back incorrect.

But even stranger than that, if (2,4) and (-3,9) are switched, as in (-3,9) is put at the end of the table, it comes back correct.

It looks like your regression is calculating b to be very slightly larger than 0. image
Especially when using regressions, which won’t always match the graph exactly, we like to offer some tolerance, even if its really small.
Another way you can look at checking is to perform the regression using the list of values but comparing to the correct answer and count residuals instead of relying on the variables that are generated:

Perfect, thank you so much!