Comparing two different math responses for correctness

How can I fix this? Students have to enter a value for input29B. Input29C needs to be less than input29B. This is what I put into CL for input29C. However, I am getting a syntax error where it got OTHERWISE but expected IDENTIFIER.

checkValue = when numericValue(input29B) > numericValue(input29C)
correct = checkValue
correct: correct

I was able to get this to work.
correct: input29C.numericValue<input29B.numericValue

What I need now is how do I code it so that the absolute value of input29C is greater than the absolute value of input29B?

:wave:t3: Hello!

You can write just about any function you want and evaluate it using the student’s input. Here,

abs = simpleFunction(`\abs(x)`)
eval1 = abs.evaluateAt(input29B.numericValue)
eval2 = abs.evaluateAt(input29C.numericValue)

should do the trick

1 Like

WOOHOO! I love it! Thanks a lot!!! :grinning: :grinning: :grinning: :grinning: :grinning: :grinning: :grinning: :grinning: