Fraction Answer in Table-Correctness

Hi all,

I am trying to get a table to check for correct slope and here is my CL below. I want the correct answers to be 7/9 and -9/7. I have tried both options below and when you hit Check Work they both are marked as incorrect. How can I fix to accept a fraction?


submitButtonText: “Check my work”

isCorrect1= tbl6.cellContent(1,2)="\frac{7\left(9\right)}"
isCorrect2= tbl6.cellContent(2,2)="-9\left7\right"

cellContent(1, 3):

#when button7.pressCount>0 and isCorrect “:+1::white_check_mark:
when tbl6.submitted and isCorrect1 “:+1:

when not(tbl6.submitted) “”

otherwise “:x: Try again…”

when tbl6.submitted and isCorrect2 “:+1:

when not(tbl6.submitted) “”

otherwise “:x: Try again.”

latex for fractions is \frac{numerator}{denominator}.

And just a tip, if you make the not submitted line your first when condition, then you can leave out the submitted part of the correctness condition.

when not(tbl6.submitted) ""
when isCorrect2 "thumbs up"
otherwise "Try again."

I don’t think there’s submit buttons for tables anymore though, so I use this alternative for the first line:

when isBlank(this.cellContent(1,2)) or this.cellHasFocus(1,2) ""

which has the added benefit of feedback remaining because it doesn’t rely on a button. (As long as tbl6 is the component you’re editing CL, you can use “this” instead of it’s name.)

1 Like