# Is there a way to get a grey check mark for a math input with multiple possibilities?

**URL:** <https://cl.desmos.com/t/is-there-a-way-to-get-a-grey-check-mark-for-a-math-input-with-multiple-possibilities/4598>\
**Category:** Questions\
**Created:** [December 2, 2022, 1:17pm UTC](https://cl.desmos.com/t/is-there-a-way-to-get-a-grey-check-mark-for-a-math-input-with-multiple-possibilities/4598 "2022-12-02T13:17:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kori\_Anniballi](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/kori_anniballi/32/3980_2.png) [@Kori\_Anniballi](https://cl.desmos.com/u/Kori_Anniballi)\
**Post date:** [December 2, 2022, 1:17pm UTC](https://cl.desmos.com/t/is-there-a-way-to-get-a-grey-check-mark-for-a-math-input-with-multiple-possibilities/4598/1 "2022-12-02T13:17:01Z")

</div>

Hi, I searched through the boards but couldn’t find what I was looking for. I’m looking for a student to enter a quadratic equation in math input. I want to get a grey check mark if they use y =; f(x) =, or just the expression. So is there a way to get a grey check mark if they entered  
f(x) = x^2 or y = x^2 or just x^2? Or can I only get a checkmark for one of these possibilities? Thanks!

---

<div class="post-metadata">

**Author:** ![ianmcmeek](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/ianmcmeek/32/3966_2.png) [@ianmcmeek](https://cl.desmos.com/u/ianmcmeek)\
**Post date:** [December 2, 2022, 4:08pm UTC](https://cl.desmos.com/t/is-there-a-way-to-get-a-grey-check-mark-for-a-math-input-with-multiple-possibilities/4598/2 "2022-12-02T16:08:10Z")

</div>

Hi! One option would be something like:

```auto
answer = firstDefinedValue(parseEquation(input).rhs, input.latex)
correct: simpleFunction(answer).evaluateAt(1.2) = 1.44 # OR correct: answer = `x^2`

```

Then if students enter something like y= or f(x)= only the expression after the equal sign is considered. If there’s no equal sign, the whole input is considered. I hope that helps!

PS - The first correctness option I entered checks the function by evaluating it at a random input just in case a student entered the function in an unexpected format like `1x^2` that doesn’t exactly match `x^2`.

---

<div class="post-metadata">

**Author:** ![Kori\_Anniballi](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/kori_anniballi/32/3980_2.png) [@Kori\_Anniballi](https://cl.desmos.com/u/Kori_Anniballi)\
**Post date:** [December 2, 2022, 5:22pm UTC](https://cl.desmos.com/t/is-there-a-way-to-get-a-grey-check-mark-for-a-math-input-with-multiple-possibilities/4598/3 "2022-12-02T17:22:01Z")

</div>

Thank you for the reply. I got warnings on them both. It didn’t find a latex argument and said something about a component with a really long code after it. Then the correct part wouldn’t work because the answer part wouldn’t work. I’m not really sure what a parseEquation refers to. I tried looking through the CL documentation but it didn’t seem like what I was looking for. Here’s a picture of what I have. Unfortunately I don’t really understand much of the CL language and the tutorials help but don’t have exactly what I’m looking for.

 ![vertex.JPG](https://canada1.discourse-cdn.com/flex031/uploads/desmos/original/2X/d/d4739316a3090ef79b1803ad328772c5ebf9c932.jpeg)

---

<div class="post-metadata">

**Author:** ![ianmcmeek](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/ianmcmeek/32/3966_2.png) [@ianmcmeek](https://cl.desmos.com/u/ianmcmeek)\
**Post date:** [December 2, 2022, 9:29pm UTC](https://cl.desmos.com/t/is-there-a-way-to-get-a-grey-check-mark-for-a-math-input-with-multiple-possibilities/4598/4 "2022-12-02T21:29:39Z")

</div>

Sorry, I had a couple errors in my initial reply - I should have taken the time to test it out first!

(1) Where I typed `input`, it should say `this` since you are putting the check for correctness inside the math input component (`this` just means “the component this script is inside of”)  
(2) It should have been `parseEquation(this.latex).rhs` instead of `parseEquation(this).rhs`

The `parseEquation(this.latex).rhs` is basically saying, if a student enters an equation, only look at the right-hand side. So if I type y=x^2 or f(x)=x^2, only look at the x^2.

I hope that clarifies a bit - I’m happy to try and rephrase or go more in depth if not. Here’s a simplified version of the activity you described:

> **[Checking Equations/Expressions Example • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/638a68d75f221fbb351f9b77)**
>
> by Ian M

---

<div class="post-metadata">

**Author:** ![Kori\_Anniballi](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/kori_anniballi/32/3980_2.png) [@Kori\_Anniballi](https://cl.desmos.com/u/Kori_Anniballi)\
**Post date:** [December 5, 2022, 12:18pm UTC](https://cl.desmos.com/t/is-there-a-way-to-get-a-grey-check-mark-for-a-math-input-with-multiple-possibilities/4598/5 "2022-12-05T12:18:24Z")

</div>

This is perfect! Thank you so much!

Have a good week, Kori
