# Help with checking for correctness

I’m dying with checking for correctness on slides 5, 14, 15, and 16. I can slog through it and check individual values but I am thinking there has to be a better way.

I’m taking a look. You need to edit slide 4. Your directions say to use x for both apples and oranges.

1 Like

Here’s an idea for slide 5.

K_ey would be for table T4000 where 1 is true for the equation and 0 is false.
For C_heck, I’ll work inside out.

Inside the curly brackets checks the elements of the lists A_1 and O_1 using the equation x+2y=10 without needing to define a function. If it is true, the output is 1. False is 0. A list is created.

I take the absolute value of the difference of that list and the key, so 0 for each element would be correct. In the CL, if G4000.number(“C_{heck}”)=0, then the table is correct.

At the end of C_heck, it won’t evaluate unless A_1 and O_1 have 6 elements.
(Note: C_heck is undefined here because you only have 2 elements in the predefined lists.)

Slide 14 could be done similarly to slide 5.
Here’s my solution for slide 15, in the table CL:

eq1=parseEquation(this.cellContent(1,1)).differenceFunction(“x”,“y”)
eq2=parseEquation(this.cellContent(1,2)).differenceFunction(“x”,“y”)

correct: eq1.evaluateAt(-3,-3)=0 and eq2.evaluateAt(-8,-4)=0

parseEquation splits an equation into the left and right side. differenceFunction() takes the left side - right side (essentially setting an equation equal to zero). (“x”,“y”) defines what variables are being used. (lhs and rhs are other functions that output at the left hand side and right hand side respectively). The correctness check evaluates whether two solutions are correct. You can use when-otherwise conditionals to give more specific feedback.

For Slide 5–Bingo-- except A_1 and O_1 should be A_2 and O_2.

A_1, O_1 were the students values from slide 3 where they could be using the graph to help find values which work and slide 5 is checking against their equation. (Note-- I have to get some distance from the coding to check the flow of all this from a pedagogical perspective. Too in the weeds right now!)

Have to work on Slide 14 now.

TY!

1 Like

I got slide 15 too. Changed it from asking for 2 equations in a table to asking for one equation in a math input so that I can ask for equations which no other student will have and then share them across the class. Needed to pull the calculations into the graph-- could not get it to work otherwise. Probably something silly I did! Used @Jay Graph from Table (graph from table • Activity Builder by Desmos) for some help too.

Again, TY. Kids are going to be using this tomorrow! Trying to crank out as many Desmos Activity Builder lessons for them as I can in this distance learning situation. They repeatedly express their appreciation-- no small feat for middle schoolers!

You should still evaluate the one equation for 2 solutions. Student could accidentally get another line through 1 solution that’s incorrect.

Honestly, I’m not quite sure the use of lhs and rhs unless you’re maybe trying to verify some form of an equation. For example, if you wanted standard form of a line, you might want to look at the rhs to evaluateAt and countNumberUsage.