How can I program a slide to show the correct answer on a task once a student has submitted their answer?
You can display a correct answer as the content of a note when input.submitted, is that what you wanted?
Or were you looking to display whether the answer was correct or incorrect?
The first one…I want to show them the answer no matter what they enter.
Awesome. In the script for the note component:
content: when input.submitted “correct answer” otherwise “prompt”
Where “input” is the name of your input component and the correct answer and prompt strings are what you want to display in the note.
I want them to get the answer only after they have entered something first. When I used the command, it displayed the answer on the preview screen. Thanks for your help.
You can put
submitDisabled: isBlank(this.latex) in the script for the input component to block the submit button on blank answers. If it’s a text input you’ll use .content instead of .latex
Did you copy/paste the text directly into the scripting window? That might be causing an error. Safari is giving me different quotation marks, you might want to delete and re-enter.
I had to retype the quotes…
That makes sense. My bad.
Come to think of it, submit should be disabled on blank entries anyway, so that last bit is unnecessary.
Is there a command that replies after submit?
It depends what you mean by reply. If you mean from teacher to student, then unfortunately, no.
If otherwise, conditional or automatic responses can be coded. Differing based on the specific type of feedback you’d like to give.
I believe I want an automatic response…
How can you do the later? have desmos assess if a non numerical input, like writing a function (ex: the input was "f(x)=3x+5) is correct or not?
I would like to have students be able to know if they are right or wrong but not give them the answer. I know numerically i can do that but didnt know if non numeric answers can do the same.
Easiest way (for me) is to make a correctness variable in your CL then control the note content conditionally based on that variable
so something like
correct = (stuff that makes it correct) content: when correct and input.submitted "You got it right!" when input.submitted "You got it wrong." otherwise "prompt"
correct variable not needed but useful if you plan on reusing this interaction