# Systems of Equations - Checking Table for Correctness

I am trying to code the tables in my activity to provide the orange triangles if a student types in an incorrect answer. I know how to do it if it is one linear equation, but the problem is that it is a system of inequalities. Can that be done? If that cannot be done, can I code the tables to give me a check or an x in the teacher dashboard?

Here is my activity so far:

What have you been using for linear equations? You can use simpleFunction. You just need to specify 2 parameters. So for children, x, and adults, y (or whatever letter you want to use). Repeat for each row changing the cell coordinates.

``````seat=simpleFunction("x+y","x","y") #theater seating
t=simpleFunction("5x+10y","x","y") #ticket revenue

cellErrorMessage(1,2): when isBlank(this.cellContent(1,1)) or isBlank(this.cellContent(1,2)) ""
when seat.evaluateAt(this.cellNumericValue(1,1),this.cellNumericValue(1,2))>250 "We don't have enough seats!"
when t.evaluateAt(this.cellNumericValue(1,1),this.cellNumericValue(1,2))<2000 "We need to make more money."
otherwise ""
``````

Or if you don’t care about the feedback in the error message (you need to hover over the to see it):

``````cellSuffix(1,2): when isBlank(this.cellContent(1,1)) or isBlank(this.cellContent(1,2)) ""
when seat.evaluateAt(this.cellNumericValue(1,1),this.cellNumericValue(1,2))<=250 and
t.evaluateAt(this.cellNumericValue(1,1),this.cellNumericValue(1,2))>=2000 "✅"
otherwise "⚠️"
``````

That is perfect, but I need the inequality be “or equal to” (not <2000 or >250). How do I code that part?

Nevermind. It is working! Thank you so much for your help! I appreciate it!

`boolEq= x<2000 or x=2000`
Should work for <=. boolEq is boolean variable and could be true or false.

For “or equal to” you just add an equal sign after (e.g. `>=2000`). Note I didn’t use it in there because I was checking that it was incorrect.

That is what I ended up doing! Thank you again!