Checking fraction answers

Hi, I am using the following code to check pupils anwser and want to checck whether they have input the fraction 1/9 - can anyone point me in the correct direction?

cellContent(1,3): when table1.cellNumericValue(1,2)= 1/9:white_check_mark:” OTHERWISE “N”

how do I write 1/9 as it wpn’t allow use of /

cellContent(1,3): when table1.cellNumericValue(1,2)>0.11 and 
table1.cellNumericValue(1,2)<0.12 "checkmark" OTHERWISE “N”

For non-terminating decimals, there can be problems with numericValue equalities, so instead we specify within a range. There are other methods using rounding or the absolute value of their difference as well.

1 Like