# Enter fraction and square root in CL

**URL:** <https://cl.desmos.com/t/enter-fraction-and-square-root-in-cl/2775>\
**Category:** Questions\
**Created:** [February 26, 2021, 11:57am UTC](https://cl.desmos.com/t/enter-fraction-and-square-root-in-cl/2775 "2021-02-26T11:57:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tam\_Huynh](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/tam_huynh/32/1959_2.png) [@Tam\_Huynh](https://cl.desmos.com/u/Tam_Huynh)\
**Post date:** [February 26, 2021, 11:57am UTC](https://cl.desmos.com/t/enter-fraction-and-square-root-in-cl/2775/1 "2021-02-26T11:57:49Z")

</div>

I do not how to set up the CL for Note 1 and table 4 in Slide 2 so after the students solve 3x^2 -2x-13=0, enter x=(1+2sqrt{10})(3) and x=(1-2sqrt{10})(3) in table4, and hit the submit button , they will receive the “Good work” feedback. If they enter other thing, they will receive the “Please try again” feedback.

I am thinking two things could go wrong in my current setup:

1. I didn’t know the correct command for fraction and square root
2. I think it is said in the CL that whenever table 4 submitted, it will give the “Please try again” no matter what.  
I really have no idea.

I attach my activity below. Can anyone help me with this? Thank you very much.

> **[14 (didn't use) Find the x-intercepts using Quadratic Formula (Math 2) (don't...](https://teacher.desmos.com/activitybuilder/custom/6038c2eb16d796673d4eb866)**
>
> by Tam Huynh

---

<div class="post-metadata">

**Author:** ![cwinske](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/cwinske/32/3106_2.png) [@cwinske](https://cl.desmos.com/u/cwinske)\
**Post date:** [February 26, 2021, 9:56pm UTC](https://cl.desmos.com/t/enter-fraction-and-square-root-in-cl/2775/2 "2021-02-26T21:56:40Z")

</div>

Try this for the answer variable in the note component.

```auto
answer=
when t.submitted and t.cellContent(1,1) = `x=\frac{1+2\sqrt{10}}{3}` and t.cellContent(2,1) = `x=\frac{1-2\sqrt{10}}{3}` "\n\nGood work! 🤩🤩"
when t.submitted and t.cellContent(2,1) = `x=\frac{1+2\sqrt{10}}{3}` and t.cellContent(1,1) = `x=\frac{1-2\sqrt{10}}{3}` "\n\nGood work! 🤩🤩"
when t.submitted "\nOops. Please try again. :) " 
otherwise ""

```

Since you want a specific format, I just used a latex match. To do this, use the backticks instead of the quotation marks. Also just a helpful tip on the formatting, I just typed in the solution on the Desmos calculator and then copied/pasted it into the code. Works like a charm! 🙂

---

<div class="post-metadata">

**Author:** ![Tam\_Huynh](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/tam_huynh/32/1959_2.png) [@Tam\_Huynh](https://cl.desmos.com/u/Tam_Huynh)\
**Post date:** [March 4, 2021, 3:13am UTC](https://cl.desmos.com/t/enter-fraction-and-square-root-in-cl/2775/3 "2021-03-04T03:13:31Z")

</div>

Thank you very much. I really like the tip on formatting 😍

---

<div class="post-metadata">

**Author:** ![Catherine\_Kraus](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/catherine_kraus/32/4487_2.png) [@Catherine\_Kraus](https://cl.desmos.com/u/Catherine_Kraus)\
**Post date:** [October 21, 2024, 4:25pm UTC](https://cl.desmos.com/t/enter-fraction-and-square-root-in-cl/2775/4 "2024-10-21T16:25:37Z")

</div>

I am trying to check fractions that repeat decimals and irrational solutions in a math entry box, this code will work when my fraction converts nicely to a decimal, but is not working for thirds or my irrational solutions  
disableEvaluation: true  
check= tan.latex"\frac{4}{3}"  
correct: check  
suffix: when not(this.submitted) “”  
when check “✅”  
otherwise “❌”

how can I change it for thirds and irrational solutions?

---

<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 22, 2024, 4:27pm UTC](https://cl.desmos.com/t/enter-fraction-and-square-root-in-cl/2775/5 "2024-10-22T16:27:29Z")

</div>

@Catherine_Kraus You may find [this thread](https://cl.desmos.com/t/question-not-accepting-numeric-equivalent-values/5424) useful. If you are still having issues, could you start a new thread and include a link to your activity? Thanks!

---

<div class="post-metadata">

**Author:** ![Catherine\_Kraus](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/catherine_kraus/32/4487_2.png) [@Catherine\_Kraus](https://cl.desmos.com/u/Catherine_Kraus)\
**Post date:** [October 22, 2024, 5:19pm UTC](https://cl.desmos.com/t/enter-fraction-and-square-root-in-cl/2775/6 "2024-10-22T17:19:15Z")

</div>

That is what I am looking for, thanks!
