Could someone please show me what to correctly type in the CL script for my Note so that if the student simplifies the expression correctly that it will display “Nice Job”. Right now I am getting an error and I don’t know why. I have the correct CL script in the “input2” so that if I type in the correct answer, it displays a checkmark in the dashboard, but when I click on Submit, it does not display the “Nice Job” message. Here is the activity (one slide):
You have a correct script in the note, but there’s no correct variable in the input. In the input, you could put this and you will get the note to display.
correct = C=U
correct: correct
Just a heads up, the student will be able to enter any form of an equivalent expression here and it will still be marked correct. This includes the original expression. You might want to consider a pattern match, or stick with your current method and include countNumberUsage.
The pattern match that you shared works; however, my answer is \frac{\sqrt{3b}}{3\left|a\right|}. When I type this solution in, it shows an x, but if I just type the denominator as 3a it marks it correct. In the solution, need to include the absolute value symbol around a in the denominator. How do I do that with the pattern matching CL script?
Sorry, I missed the absolute value sign. I don’t think think I’ve seen a way to pattern match for absolute value signs, but maybe @JayChow has a suggestion.
One idea I can think of is to pattern match the numerator, but instead of matching the denominator, we could parse the expression and then use evaluateAt to make sure an absolute value symbol was used. This should work for you, but it’s still possible to have false positives, although not as likely as the original code.