I am working on completing the square activity and want to let my students know if they got the right answers. This is supposed to be learning activity and they should know if one answer is correct to be able to fix the error. So far if they answer correctly on both they get a check-mark, but if they miss one I could not check one that is correct because cell are linked in logic.
I would appreciate if one more set of eyes check and code flow.
The logic is in the table named t22.
I’ll attach the code and activity if someone has time to look at it.
Thank you in advance.
rootC2=numericValue("\round(${this.cellNumericValue(2,2)},2)")
rootCs1=this.cellContent(1,2)
rootCs2=this.cellContent(2,2)
xR1=numericValue("\round(${x1},2)")
xR2=numericValue("\round(${x2},2)")
boolHF1= not(this.cellHasFocus(1,2))
boolHF2= not(this.cellHasFocus(2,2))
bool1=boolHF1 and ((rootC1 = xR1 and rootCs2 = "")
or (rootC2= xR1 and rootCs1="")
or (rootC1 = xR1 and rootC2 = xR2)
or (rootC1 = xR2 and rootC2 = xR1)
or (rootCs1="n" or rootCs1="N" and isUndefined(x1))
or (rootCs2="n" or rootCs2="N" and isUndefined(x2)))
bool2=boolHF2 and ((rootC2= xR1 and rootCs1 = "")
or (rootC1=xR1 and rootCs2 = "")
or (rootC1 = xR1 and rootC2 = xR2)
or (rootC1 = xR2 and rootC2 = xR1)
or (rootCs1="n" or rootCs1="N" and isUndefined(x2))
or (rootCs2="n" or rootCs2="N" and isUndefined(x1)))```
[Completing the square](https://teacher.desmos.com/activitybuilder/custom/602047aa7862d20cc9984f1d)
[https://teacher.desmos.com/activitybuilder/custom/602047aa7862d20cc9984f1d](https://teacher.desmos.com/activitybuilder/custom/602047aa7862d20cc9984f1d)