# Check a correct answer

**URL:** <https://cl.desmos.com/t/check-a-correct-answer/2943>\
**Category:** Questions\
**Tags:** validation, correctness\
**Created:** [March 19, 2021, 12:21am UTC](https://cl.desmos.com/t/check-a-correct-answer/2943 "2021-03-19T00:21:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrC](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@MrC](https://cl.desmos.com/u/MrC)\
**Post date:** [March 19, 2021, 12:21am UTC](https://cl.desmos.com/t/check-a-correct-answer/2943/1 "2021-03-19T00:21:00Z")

</div>

Hi  
I am trying to check a maths input against an answer that is a variable calculated from random value generated in a note but can’t get the variable in note into the Maths input to check against.

Hopefully this makes sense - new to this.

thanks

---

<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:** [March 19, 2021, 1:30am UTC](https://cl.desmos.com/t/check-a-correct-answer/2943/2 "2021-03-19T01:30:58Z")

</div>

When you create a variable, `myVariable`, in one component, `myComponent`, and want to reference it in another use the general format:

```auto
myComponent.script.myVariable

```

If you’re using it in within a string or a calculation (e.g. in `numericValue( )` or `simpleFunction( )`), you need to surround it with `${ }`.

---

<div class="post-metadata">

**Author:** ![MrC](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@MrC](https://cl.desmos.com/u/MrC)\
**Post date:** [March 20, 2021, 11:35pm UTC](https://cl.desmos.com/t/check-a-correct-answer/2943/3 "2021-03-20T23:35:16Z")

</div>

Many thanks for your help - now working.

If it isn’t too much to ask … now I can check the answer is correct could you point me in the right direction on how can I pass back a message to say they are correct.

Many thanks

---

<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:** [March 21, 2021, 1:54am UTC](https://cl.desmos.com/t/check-a-correct-answer/2943/4 "2021-03-21T01:54:16Z")

</div>

There are many more examples on this forum. This one is from @JayChow at Desmos:

> [@Math input feedback](https://cl.desmos.com/t/math-input-feedback/177):
>
> Give feedback for answers in math input

---

<div class="post-metadata">

**Author:** ![MrC](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@MrC](https://cl.desmos.com/u/MrC)\
**Post date:** [March 21, 2021, 8:26pm UTC](https://cl.desmos.com/t/check-a-correct-answer/2943/5 "2021-03-21T20:26:23Z")

</div>

Many thanks for this – your help is very much appreciated.

Robin
