# Verify values in a table are correct

**URL:** <https://cl.desmos.com/t/verify-values-in-a-table-are-correct/2851>\
**Category:** Questions\
**Tags:** validation, correctness\
**Created:** [March 6, 2021, 6:19pm UTC](https://cl.desmos.com/t/verify-values-in-a-table-are-correct/2851 "2021-03-06T18:19:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Vasicek](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/mark_vasicek/32/984_2.png) [@Mark\_Vasicek](https://cl.desmos.com/u/Mark_Vasicek)\
**Post date:** [March 6, 2021, 6:19pm UTC](https://cl.desmos.com/t/verify-values-in-a-table-are-correct/2851/1 "2021-03-06T18:19:04Z")

</div>

I made a table. Kids will input values. How do I give them feedback to check that their answers are correct? I am new to the computation layer and trying to teach myself how to use it. Any help you could give would be appreciated. Thanks.

[https://teacher.desmos.com/activitybuilder/custom/6043c4496054e30d62c0b78b](https://teacher.desmos.com/activitybuilder/custom/6043c4496054e30d62c0b78b)

---

<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 6, 2021, 11:08pm UTC](https://cl.desmos.com/t/verify-values-in-a-table-are-correct/2851/2 "2021-03-06T23:08:15Z")

</div>

Is there something that’s not working? Or are slides 3 and 4 not yours? If not yours, look at my next post.  
The only feedback for those I can give is for table T1300A on Slide 4 you have:

```auto
...when a1 and not(isBlank(this.cellContent(1,3))) "👍"...

```

`and not(isBlank(this.cellContent(1,3)))` is redundant because a1 requires an entry in cell(1,3) to be true.

---

<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 6, 2021, 11:14pm UTC](https://cl.desmos.com/t/verify-values-in-a-table-are-correct/2851/3 "2021-03-06T23:14:49Z")

</div>

Generally for giving feedback in a table, I like to use `cellSuffix` for short numeric answers that can be represented as terminating decimals:  
For student answers in column 2:

```auto
cellSuffix(1,2): when isBlank(this.cellContent(1,2)) or cellHasFocus(this.cellContent(1,2)) ""
when this.numericValue(1,2)=targetNumberHere "✅"
otherwise "❌"

```

Repeat for each cell changing the row number and target answer.

---

<div class="post-metadata">

**Author:** ![Mark\_Vasicek](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/mark_vasicek/32/984_2.png) [@Mark\_Vasicek](https://cl.desmos.com/u/Mark_Vasicek)\
**Post date:** [March 7, 2021, 11:58pm UTC](https://cl.desmos.com/t/verify-values-in-a-table-are-correct/2851/4 "2021-03-07T23:58:38Z")

</div>

Thanks for getting back to me. I want the cell input to be an expression like 2_2_2 or 5^2. I think I know what to do when it’s a number value. How do I identify the input when it is an expression and not a number?

---

<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 8, 2021, 1:28am UTC](https://cl.desmos.com/t/verify-values-in-a-table-are-correct/2851/5 "2021-03-08T01:28:38Z")

</div>

You probably want `countNumberUsage`. Check out this post (you can still use numericValue instead of evaluateAt):

> [@Checking Math Input for Correct Rational Expression](https://cl.desmos.com/t/checking-math-input-for-correct-rational-expression/2829/3):
>
> The more complicated (but stable) method is to evaluate a function AND check that certain numbers were used (since you’re looking for a particular format), so for your example above: #student expression exp=this.latex #student input as a function f=simpleFunction(exp) check= f.evaluateAt(3)=0 and f.evaluateAt(2)=-0.2 and countNumberUsage(exp,3)=1 and countNumberUsage(exp,2)=1 and countNumberUsage(exp,1)=1 You want to evaluate at as many values you feel is adequate. I only did a few but…
