Using simple Function with Trig

Hello! Is there a way to use simple function to check for correctness when my students enter a trig function into the math answer box to match a graph? I want to keep track of how many graphs they match at the end. Here is what I am working on.

Instead of using simpleFunction I would use it in the graph component. This is an example from your screen 5 look in the correctness folder in the graph component.

Thanks! I also have a lesson score slide at the end. How can I get that to show up as 1 out of 1 on the lesson score slide?

The variable I_{iscorrect} is what you’re looking for. In @SteinSchreiber 's edit, I’d change your “correct” variable in the input to:

correct= graph.number(`I_{iscorrect}`)=1
Score= graph.number(`I_{iscorrect}`)

Then you shouldn’t really need to change anything else later, though for dashboard correctness, you should add readOnly: true to the graph.

You don’t need to have separate D1, D2, etc. You can just pass the list through your difference function, and take the total:

I_{scorrect}={ total(D(f(x_{check}),g(x_{check}))<t_{ol}:1,0 }

I figured that would work as well. Thanks.

Thank you! It works! :slight_smile: