Systems of Equations (check correct in a Table)

I am trying to figure out how to do “isCorrect” in such a way that cell(1,2) is not the same equation as in cell(1,1). Here is my coding so far:

#Correct response x+y=59685 or 5x+2.5y=270425

#creates lhs-rhs, so f(x,y)= x+y-59685 and g(x,y)=5x+2.5y-270425
f = parseEquation(this.cellContent(1,1)).differenceFunction(“x”,“y”)
g = parseEquation(this.cellContent(1,2)).differenceFunction(“x”,“y”)

#solutions should = 0
checkA = f.evaluateAt(59685,0)=0 and f.evaluateAt(0,59685)=0
checkB = f.evaluateAt(54085,0)=0 and f.evaluateAt(0,108170)=0
checkC = g.evaluateAt(59685,0)=0 and g.evaluateAt(0,59685)=0
checkD = g.evaluateAt(54085,0)=0 and g.evaluateAt(0,108170)=0

correct: (checkA and checkD) or (checkB and checkC)

isCorrect1 =
isCorrect2 =

Do I need to add some other coding before I get to isCorrect1 and isCorrect2? I’m wanting isCorrect1 to represent the entry in cell(1,1) and isCorrect2 to represent the entry in cell(1,2).

isCorrect1 = checkA or checkB
isCorrect2 = when checkA checkD when checkB checkC otherwise false
1 Like

That worked!!! Thank you so much! I have learned so much from you - you have no idea!!!

1 Like