Limit number of student responses in MC

To keep students from multiple-guessing until they have the correct answer, I only want them to have 3 attempts. How do I code that?

(First answer is 15 and the MC answer is Each section of new pipe added 15 feet.)


Try this?
Using Button pressCount to countdown # of attempts left

To only change the number of attempts on the math input:

In your script for input1 add:
submitDisabled: this.submitCount>=3

this will disable the submit button once a student has submitted 3 answers

**In your script for your note and mc 1, you will want to add to your “correct” variable: **
"and and input1.submitted"

This will require the students actually submit an answer before the multiple choice problem will appear (otherwise they can still guess as many times as they want and the multiple choice would appear as soon as a 15 is there, regardless of whether they submitted).

If you also want to limit the number of times a student can guess on the multiple choice, I believe you will need to add an action button. I do this and label it “Check my Answer”
Then change the resetLabel based on the response they selected “Good work!” or “Try Again” and then have it disable after a set number of guesses. If this is something you’re interested in, let me know and I can add it to your activity to show you what it looks like.