Self-Checking with two possible answers

How could I use the self-checking script to accept two answers independent of each other. I do not want to have two math input boxes. I want one math input box that will accept two or more answers. The following script is for just one answer. I am just inquiring on how it would need to change to accept two correct responses.

Here is the script I am using.

problem = Sample1
answer = 6 (I want to accept two unique answers in one math input template)

studentAnswer = problem.numericValue

content: when (studentAnswer = answer and problem.submitted) “Your answer of ${studentAnswer} is CORRECT!”
when (problem.submitted) “Your answer is incorrect.”
otherwise “”

Here is a link to that activity. Sample • Activity Builder by Desmos

There’s no simple way to do so. You might be able to adapt some of the solutions in the thread here for graphing compound inequalities, but I’d say it’s a lot easier to use a table or two math inputs (and you’d still have to direct students to input answers in a certain way).

Yeah, I’d go with Daniel’s suggestion of a table or two inputs. I suppose if you wanted to go full degen you could have them enter answer one, click a button to capture the value then delete and enter answer two, and click the button again to capture the second answer.

I think a table or two inputs would require less explanation to students and less coding though. :laughing:

Thanks for your help! I really appreciate it.