Math Input Immediate Feedback for an Expression

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.

I’d use a table with a cell for each entry and use numericValues with countNumberUsage (if you specifically want fraction form), or look into the new pattern CL.

You can publish and share the activity to make it easier to assist.

My activity can be found out at 7-1 Ratios and Proportions (Day 1) • Activity Builder by Desmos and it is the 14th slide

Let me know if there is anything alternative, or if the table with a cell entry is the best way to go!

This is how I would do it. (See Slide 14)

Thank you! This worked perfectly and is easy to understand!!

1 Like

Appreciated if you’d share your final product, so I can clean out examples. :slight_smile: Thanks!

Solution can be found at 7-1 Ratios and Proportions (Day 1) • Activity Builder by Desmos on slide 14!

1 Like