# Check a quadratic equation and ordered pair in a table

**URL:** <https://cl.desmos.com/t/check-a-quadratic-equation-and-ordered-pair-in-a-table/2670>\
**Category:** Questions\
**Tags:** validation, correctness\
**Created:** [February 14, 2021, 3:17am UTC](https://cl.desmos.com/t/check-a-quadratic-equation-and-ordered-pair-in-a-table/2670 "2021-02-14T03:17:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Megan\_Spooner](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/megan_spooner/32/1279_2.png) [@Megan\_Spooner](https://cl.desmos.com/u/Megan_Spooner)\
**Post date:** [February 14, 2021, 3:17am UTC](https://cl.desmos.com/t/check-a-quadratic-equation-and-ordered-pair-in-a-table/2670/1 "2021-02-14T03:17:09Z")

</div>

We are working on quadratics in standard and vertex form and finding zeros and vertex. I would like to be able to check that an equation that they have typed into the table is correct same with an ordered pair. I don’t know if it would be better to have them in a different component. Here is the slide I am trying to get to work.  
[https://teacher.desmos.com/activitybuilder/custom/60288f8bd663790e97c1dc35](https://teacher.desmos.com/activitybuilder/custom/60288f8bd663790e97c1dc35)  
Thanks in advance for any help!

---

<div class="post-metadata">

**Author:** ![Susan\_Lauer](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/susan_lauer/32/1832_2.png) [@Susan\_Lauer](https://cl.desmos.com/u/Susan_Lauer)\
**Post date:** [February 14, 2021, 2:10pm UTC](https://cl.desmos.com/t/check-a-quadratic-equation-and-ordered-pair-in-a-table/2670/2 "2021-02-14T14:10:47Z")

</div>

Since you want them to have a particular form, I recommend using countNumberUsage for the h and k (though I didn’t need the negative for the k). If you don’t check the form somehow, they will be able to just enter the given form to get a check for three points matching.

Since it’s a quadratic, it’s uniquely defined with 3 ordered pairs, so maybe check three points.

When I’m filling in a table as a student, I am happier if there’s not an x by my work where I’m typing, so I added more conditionals on the suffix.

```auto
f = simpleFunction("x^{2}+6x-2")
input = simpleFunction(this.cellContent(1,2))

check12 = 
f.evaluateAt(0)=input.evaluateAt(0) and 
f.evaluateAt(1)=input.evaluateAt(1) and 
f.evaluateAt(2)=input.evaluateAt(2) and 
countNumberUsage(this.cellContent(1,2),3)=1 and 
countNumberUsage(this.cellContent(1,2),11)=1 

cellSuffix(1,2): 
when this.cellHasFocus(1,2) or this.cellContent(1,2)="" or button8.timeSincePress = 0 "" 
otherwise when check12 "✅" otherwise "❌"

```

---

<div class="post-metadata">

**Author:** ![Megan\_Spooner](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/megan_spooner/32/1279_2.png) [@Megan\_Spooner](https://cl.desmos.com/u/Megan_Spooner)\
**Post date:** [February 14, 2021, 2:50pm UTC](https://cl.desmos.com/t/check-a-quadratic-equation-and-ordered-pair-in-a-table/2670/3 "2021-02-14T14:50:07Z")

</div>

Thank you so much for your help! This worked perfectly!!! As always, I appreciate the help from this Desmos community 🙂
