Math Operation string

I am trying to get a checkmark in (2,5) to appear when this:

this is my script. Can’t figure out why it won’t work. Can someone help?

Latex matching is not recommended, but it looks like you’re using single quotes (by the Enter key) instead of backticks (by the 1 key).

Tip: You can use “this” to reference the current component you’re editing.
This is not perfect. The last cell for example would accept 400^1. Or the second cell would accept 2*2*5*20

p=patterns
#checks each cell evaluates to 400
check400= this.cellNumericValue(2,2)=400 and this.cellNumericValue(2,3)=400 
    and this.cellNumericValue(2,4)=400
#this accepts any product of 4 integers regardless of order or format
check1= p.product(p.integer,p.integer,p.integer,p.integer).matches(this.cellContent(2,2))
#accepts any product of a pair of exponential expressions of integers
check2= p.product(p.exponent(p.integer,p.integer),p.exponent(p.integer,p.integer)).matches(this.cellContent(2,3))
#accepts any single integer to a power
check3= p.exponent(p.integer,p.integer).matches(this.cellContent(2,4))
checkAll= check400 and check1 and check2 and check3
cellContent(2,5): when checkAll "✅" otherwise ""

The current Slide 2 here is how I tested checks individually without having to type answers every time.

1 Like

Thank you! It was a \ that I was missing!