Using the Computation Layer to check a negative number as correct answers

How can I get the Computation Layer to check a negative number as correct answer?

I used — correct: SlopeABinput.numericValue=-1.5

I does not mark the answer as correct.

It’s a simple slope of perpendicular lines activity. Entering a negative number should not be this difficult.

Nothing looks amiss in that. Can you share your activity?

I go mad and deleted the components so that I could move on. Can I copy it and share the copy?

You can just use “Share Activity” and post whatever link you like. I can’t edit your copy.

Are you looking for the dashboard checkmark? Because having an explain prompt will at best give you a dot.

The negatives seem to be working fine for me. If you uncheck the “Explain your answer” for the multiple choice, you’ll see the checkmark.

What I sent was what I was left to accept because I was having problems with getting it to accept a negative answer. That’s why I wanted to make a copy and input what I originally had to show you that it was NOT working.

The explain is not my problem.

I found a work around for my problem. Thank you.

If your intent is for students to see that they have the correct answer, you could use suffix to display info when it’s correct. This statement in the CL of one of the slopes for screen 3 will require that both slopes and the multiple choice are correct.

suffix: when SlopeABinput.numericValue = -0.2 and SlopeCDinput.numericValue = -0.25 and MC3.isSelected(3) "✅" otherwise "❔"

I changed them to negatives in the one you sent and it worked fine.

What if it’s a negative repeating decimal?

Similar to @Susan_Lauer’s above, but instead of equality check if the value is between a few decimal values. For example, for -1/3:

...when SlopeABinput.numericValue>-0.34 and SlopeABinput.numericValue<=0.33

or to whatever decimal place you prefer.