Giving feedback on multiple choice questions

Could someone show me a sample script that “collects” multiple choice answers and gives feedback after the last question in the form of "You got “x” out of “total.” I don’t want it to say which ones are correct/incorrect.


Does this work for you? The last slide contains the majority of what you’re looking for, but I set up some road blocks in case a problem is skipped.

Wow, that is terrific. I will try setting up my quiz tomorrow. Thank you so much and I want to compliment the whole Desmos team. You have been such a help to me. Tech support is outstanding.


It is a pity that the answers need to be stored in the graph on the final screen, rather than being able to read off a multiple choice answer key. The way it is set up, the teacher dashboard won’t have any indication as to whether the answers are correct.

I tried the multiple choice template but it doesn’t seem to work. I set the correct answer for question1 to option 1, q2 to option 2, q3 to option 3 and q4 to option 4 just to see if it would score the questions correctly. Then I went in to student preview and took the quiz and it said I got 1 correct out of 4. So am I missing something?


I forgot to mark the answer key when I made the template. Like @Bryn said, the teacher dashboard would not indicate correctness. I updated the original link to include the answer key. In order to get the last slide to work correctly, you need to adjust the code in the graph component to match the answer key.

@Bryn I only used the graph component to add up the correct answers. Is it possible to do simple operations inside a note? I haven’t seen an example, but I’m sure it’s possible. It would be nice to have a source called isCorrect that reads the answer key and returns true or false.

That seems to work, thanks. One last question. The text you used to illustrate a question was all text “Pick this option.” However, I want to put in equations. How do I put a properly formatted equation like 3x^2+2x+1 or a factored form like (x-1)(x+2) into the script?


Here’s a result screen without a graph:

Its also useful to create a correct variable in addition to your correct sinks if you plan on using correctness elsewhere. Most time we will just create a boolean value but in cases like this assigning a numeric value makes it easier to calculate on the last screen.

Just an FYI, dashboard correctness can still be used via the answer key or with use of a correct: sink.

Thanks for the tips! I thought about using the variables, but I wasn’t sure how to do the formatting when adding the numeric values, so I opted to do something similar but just used the calculator.

@mrabourn To answer your questions about the math formatting, you don’t actually need to use that in the script. When the script says choice.isSelected(1), that means first choice was the correct one no matter what you typed as the options. The answer could be apple, x^2, y=2x-3, or anything.

Thanks Jay, a very elegant solution.

I still don’t like a method that forces activity creators to set the correctness of multiple choice that isn’t the one built in (using the answer key) as I think it is more error prone (e.g. if I shuffle options, the CL code doesn’t update).

Hence this other request of mine posted here.

I don’t think the creators of Desmos really want it to be an online quiz generator so maybe that’s why the features are not built-in.However, it would be nice to have several templates that did keep track of student input. Have you looked at ExamView? That might more closely meet your needs.