# Self-Checking with two possible answers

**URL:** <https://cl.desmos.com/t/self-checking-with-two-possible-answers/3457>\
**Category:** Questions\
**Tags:** validation, correctness\
**Created:** [June 7, 2021, 9:09pm UTC](https://cl.desmos.com/t/self-checking-with-two-possible-answers/3457 "2021-06-07T21:09:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juan\_Perez](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/juan_perez/32/2809_2.png) [@Juan\_Perez](https://cl.desmos.com/u/Juan_Perez)\
**Post date:** [June 7, 2021, 9:09pm UTC](https://cl.desmos.com/t/self-checking-with-two-possible-answers/3457/1 "2021-06-07T21:09:22Z")

</div>

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 by Juan Perez](https://teacher.desmos.com/activitybuilder/custom/60b7dcade7201838a35bb476)

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [June 7, 2021, 9:34pm UTC](https://cl.desmos.com/t/self-checking-with-two-possible-answers/3457/2 "2021-06-07T21:34:31Z")

</div>

There’s no simple way to do so. You might be able to adapt some of the solutions in the thread [here](https://cl.desmos.com/t/compound-inequalities-in-one-variable-how-to-use-cl-to-check/1916) 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).

---

<div class="post-metadata">

**Author:** ![SandiG](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/sandig/32/1895_2.png) [@SandiG](https://cl.desmos.com/u/SandiG)\
**Post date:** [June 8, 2021, 6:31am UTC](https://cl.desmos.com/t/self-checking-with-two-possible-answers/3457/3 "2021-06-08T06:31:39Z")

</div>

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. 😆

---

<div class="post-metadata">

**Author:** ![Juan\_Perez](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/juan_perez/32/2809_2.png) [@Juan\_Perez](https://cl.desmos.com/u/Juan_Perez)\
**Post date:** [June 8, 2021, 12:45pm UTC](https://cl.desmos.com/t/self-checking-with-two-possible-answers/3457/4 "2021-06-08T12:45:08Z")

</div>

Thanks for your help! I really appreciate it.
