Testing the equality of two variables

I have two variables, one calculate in a graph (m) and the other that the student enter in an input box (me). I want to test if the two variables have the same value. If so, print “Congrats !”, otherwise, print “try again”.
I have a bug in the when line. What is wrong in my computational ?

Thanks in advance !

content: when isBlank(input2.latex) “Return to the last screen and enter a value for the slope.”
otherwise "the slope you enter is ${me}

The exact value of the slope is ${m}"

m = graph2.number(“m_r”)

me = input2.numericValue

when me = m “Congrats !” otherwise “try again”

You need a variable for that last conditional. Something like this:


Thanks a lot M. Chow !

1 Like