One of the neat features of programming in the Desmos Computation Layer (CL) is the ability to see whether a student’s answer is correct or incorrect in the activity dashboard. To see this, you need to identify the “correct” answer in the CL.
The command for this is “correct:” and an example of its use would be:
correct: input.numericValue=2
This command would show the correct check when a student types the equivalent of the number `2` in the input (in this case it would be a math input). Note that any equivalent expression like 4/2 would also be interpreted correct answer in this example.
You can also identify multiple answers as correct using “or.” For example:
correct: input.numericValue=2 or input.numericValue=4
If there are multiple inputs for a slide, you can use “and” to set those parameters with the “correct:” sink. For example:
correct: input1.numericValue=5 and input2.numericValue=10
When you have multiple correct answers, it is important to use the “readOnly:true” command in the CL of the input that does not identify the “correct:” parameters. Otherwise, you will see a dot instead of a check when the inputs are correct. In the example above, if the “correct:” command is used in the CL of input1, in the CL of input2 you would write:
readOnly:true
You can use the “correct:” command only in the following inputs:
- Math Input
- Multiple Choice (This is unnecessary if you mark the correct answer in the choice box)
- Checkboxes (This is unnecessary if you mark the correct answers in the choice box)
- Graph
- Table