Question not accepting numeric equivalent values

In my activity, Unit 8 Day 1 Unit Circle Identities HOMEWORK • Activity Builder by Desmos
I have a question on slide 9 to have the code:

disableEvaluation: true

answer =numericValue((“-\frac{\sqrt{3}}{3}”))

correct:question7c.numericValue=answer

When the numeric equivalent value of -\frac{1}{\sqrt{3}} is entered, the question is marked incorrect.

Why is this happening?

For non-terminating decimal equivalents, calculations do not always come out equivalent. Try checking the difference is within a tolerance:

tolerance = 0.01
correct = numericValue(`\abs(${question7c.numericValue} - ${answer} ) `) <= tolerance

Right. I should have thought of that!
Thanks
Amy

So, I got it to give students the green checkmark, but now I can’t get a check mark on the teacher dashboard (for either answer)
Here is the current version. It is slide 9.

The dashboard checkmark is determined by all correctable components meet the condition of the correct sink or it is marked readOnly: true. Sinks are the ones followed by a colon. Having a text response will at best allow a dot.

In your math input component add correct: correct, which will use the correct variable you defined as the condition for the sink. You’ll also need to add readOnly: true in your sketch component, so it ignores it when determining correctness.

I knew about the readOnly:true part, but I am still learning (very slowly) about sinks and how they work.
I had wondered about why the correct:correct was in some coding. Now that makes sense.
Thanks for all your help!

1 Like