# Student enters sqrt in table, want to autocheck

This activity Special Right Triangles • Activity Builder by Desmos

On screen three, I’d like the table entries to be self-checking. I want them to enter their answers in simplified square roots. This is what I’ve tried in CL:

cellContent(2,4): when table4.cellNumericValue(2,2)=2 “” otherwise “
cellContent(2,5): when table4.cellNumericValue(2,3)=(2\sqrt{2}) “” otherwise “

It doesn’t like it. The top line works fine, but the bottom one doesn’t.

I’d also like to check both cells with one checkmark, or an x if one or both are wrong.

This is one possible approach. You will probably need to do patterns if you want to make sure they are simplifying roots.

Hi Laura! I think if you add a second “numericValue()” around the 2\sqrt{2} it will fix it.
If you would like to check each box individually, I would recommend cellSuffix (instead of adding more rows to the table). It could look something like this:

cellSuffix(2,2): when this.cellNumericValue(2,2)=2 “” otherwise “
cellSuffix(2,3): when this.cellNumericValue(2,3)=(numericValue(2\sqrt{2})) “” otherwise “

As the person above said though, if you want to make sure their answer is exactly 2\sqrt{2} (not some other numerically equivalent version like sqrt{8} for example) you’ll want to check for that as a string, not the numeric value.

If you would like to add another column at the end and have both answers be checked by that one box, you could do this:
cellContent(2,4): when this.cellNumericValue(2,2)=2 and this.cellNumericValue(2,3)=(numericValue(2\sqrt{2})) “” otherwise “