I have been extremely successful with figuring out how to create a code that gives students immediate feedback. I have also successfully written a code for more than one answer to be accepted. However, I can not wrap my head around this problem. I have had answers like “10 and -14” be accepted when typed in a Math Input.
I have written the following:
exp6 = "-\frac{9}{2},\8"
exp7 = "8,\-\frac{9}{2}"
exp8 = "-\frac{9}{2},\ 8"
exp9 = "8,\ -\frac{9}{2}"
exp10 = "-\frac{9}{2}\ and\ 8"
exp11 = "8\ and\ -\frac{9}{2}"
correct6 = question9d.latex = exp6 and this.submitted
correct7 = question9d.latex = exp7 and this.submitted
correct8 = question9d.latex = exp8 and this.submitted
correct9 = question9d.latex = exp9 and this.submitted
correct10 = question9d.latex = exp10 and this.submitted
correct11= question9d.latex = exp11 and this.submitted
correct: correct6 or correct7 or correct8 or correct9 or correct10 or correct11````
This is is attached to my Math Input. The code below is what I have attached to my Note, which will inform students whether or not they are correct.
content: when question9e.script.correct6 or question9e.script.correct7 or question9e.script.correct8 or question9e.script.correct9 or question9e.script.correct10 or question9e.script.correct11 "Correct!"
when question9e.submitted "Please try again."
otherwise " "
I did the same thing with a separate problem, that only had whole numbers. I tried to type the fraction the way it is interpreted, but it did not work. I am unsure what I need to tweak to have these answers accepted.
If anyone has an idea please let me know! I am at a standstill.