# Checking Text Answer in CL

**URL:** <https://cl.desmos.com/t/checking-text-answer-in-cl/475>\
**Category:** Questions\
**Tags:** validation, correctness\
**Created:** [May 8, 2019, 4:34pm UTC](https://cl.desmos.com/t/checking-text-answer-in-cl/475 "2019-05-08T16:34:45Z")\
**Posts on this page:** 1\
**Showing post:** 10

<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:** [October 17, 2019, 5:57pm UTC](https://cl.desmos.com/t/checking-text-answer-in-cl/475/10 "2019-10-17T17:57:58Z")

</div>

If student input is exp1b, you could try using parseEquation, differenceFunction, and evaluateAt. It’s probably a good idea to create a single variable/boolean to check in your note. For example:

#This creates an expression of the left-hand side minus the right-hand side with variables x and y.

checkThis=parseEquation(exp1b).differenceFunction(“x”,“y”)

#This creates a true/false boolean by checking 2 correct solutions to the function

check=checkThis.evaluateAt(1,2)=0 and checkThis.evaluateAt(2,3)=0

content: when exp1b.timeSinceSubmit\>0 and check “Excellent!”  
otherwise “Almost! Try again.”

Your original content when otherwise won’t work for a few reasons.  
I think you wanted 2 conditions to show ‘Excellent’. Each “when” should have a condition and result. ‘otherwise’ is the result if none of the ‘when’ conditions are true. So, you can’t have 2 ‘otherwise’

---

_[View the full topic](https://cl.desmos.com/t/checking-text-answer-in-cl/475)._
