# Checking correctness of activity won't show

Dear Desmos Community,

I have tried my first attempts at including the correct sink the activity Trigonometrische Schaubilder: Die Periodenlänge • Activity Builder by Desmos (based on activity Trigonometric Graphing: Introduction to Amplitude and Vertical Shift • Activity Builder by Desmos)

I tried it the following way, which unfortunately does not seem to work:
correct: (p0.numericValue=6.28319 or p0.latex=2\pi) and graph0.number(“d”)<0.1

Could you maybe point me to where my mistake is? Thanks a lot in advance!

Not sure which slide this is on (and didn’t see any slides with the components in your example and also don’t know what “d” is). Your rounding may not be the same as actually occurs with the calculator. You can use rounding in a calculation, or sometimes simpleFunction is more reliable than numericValue:

correct: numericValue(\round(${p0.latex},5))=6.28319  or correct: simpleFunction(p0.latex).evaluateAt(0)=simpleFunction(2*\pi).evaluateAt(0)  (I also added a multiplication for 2pi, but don’t think it should matter.) 1 Like Thanks a lot for the quick response. I was referring to screen 1 - sorry thatvI forgot to mention that. Using the rounding function or the equation is way more elegant than my way - great! I will try that as soon as I can. D is the difference between 2 Pi and the absolute distance between the two dragable points. The idea was to drag the points that one period is highlighted. I just tested it and the math input shows up as correct. Nonetheless there is only a dot in the upper left and it will not turn into a checkmark even if both are correct (the distance and the input) You will need to set the graph itself to read only (readOnly: true), or set the correct condition on the graph to match that of the input box. The dot indicates there is a component on the page that needs to be manually checked, which in this case was the graph without a correctness condition. Read Only indicates that the dashboard doesn’t need to worry about that component - it doesn’t affect the editability of the graph or anything like that. 2 Likes Thanks a ton! With your help I managed to make it work - great! In the math input I now used correct: numericValue(\abs(2*\pi-\round(${p0.latex},5)))<0.004
This way it will accept 6.24 as a solution (if students calculate 2 Pi in their head).

And in the graph I used
correct: graph0.number("d")<0.1

Thank you both!

Don’t really need the rounding if you’re checking with an inequality.

Since you have a graph, sometimes it’s actually simpler to have comparison calculations done in graph that output 1 or 0 and then just use that number as your check for other components. It’s one of the best ways to check functions. Not always more efficient for numeric answers.

1 Like

Yes - that is a good idea.

So in the graph I’d use something like
I={D<0.004 : 1, D>=0.004: 0

And in the CL window
Correct: numericValue(I)=1

Thank you - this has improved my general understanding of the syntax.

Assuming D is already absoluted, yes, this would work fine. The syntax also allows for a “default” value too when the condition is not true, so you can reduce it to
I={D<0.004:1, 0}

correct: this.number(I)=1


not numericValue, but you’d have figured that out when you tried to do it!

1 Like