# Checking solutions of Linear Inequalities Systems

**URL:** <https://cl.desmos.com/t/checking-solutions-of-linear-inequalities-systems/3980>\
**Category:** Questions\
**Created:** [January 20, 2022, 9:25pm UTC](https://cl.desmos.com/t/checking-solutions-of-linear-inequalities-systems/3980 "2022-01-20T21:25:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lillian\_Hart-Usher](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/lillian_hart-usher/32/3293_2.png) [@Lillian\_Hart-Usher](https://cl.desmos.com/u/Lillian_Hart-Usher)\
**Post date:** [January 20, 2022, 9:25pm UTC](https://cl.desmos.com/t/checking-solutions-of-linear-inequalities-systems/3980/1 "2022-01-20T21:25:19Z")

</div>

On screen 2, I am trying to get the shaded region of the system to appear, but only if they correctly identify an ordered pair in the region.  
It will show up if I press the button 4 times like I asked it to, but not after the first condition.

Please help 😩

[https://teacher.desmos.com/activitybuilder/custom/61e896043838f81f8c8280b4](https://teacher.desmos.com/activitybuilder/custom/61e896043838f81f8c8280b4)

---

<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:** [January 20, 2022, 11:13pm UTC](https://cl.desmos.com/t/checking-solutions-of-linear-inequalities-systems/3980/2 "2022-01-20T23:13:41Z")

</div>

when- (when-) otherwise conditionals go through each step until something is true and output the corresponding result. If you don’t want the shading to show up at all until they find a correct ordered pair AND the button is pressed four times, then that should be in one line (add the second when condition as part of the first):

```auto
number("s_{howGraph}"): 
when check3 and button1.timeSincePress>0 and button1.pressCount=4 1
otherwise 0

```

---

<div class="post-metadata">

**Author:** ![Lillian\_Hart-Usher](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/lillian_hart-usher/32/3293_2.png) [@Lillian\_Hart-Usher](https://cl.desmos.com/u/Lillian_Hart-Usher)\
**Post date:** [January 20, 2022, 11:22pm UTC](https://cl.desmos.com/t/checking-solutions-of-linear-inequalities-systems/3980/3 "2022-01-20T23:22:56Z")

</div>

![Screen Shot 2022-01-20 at 5.19.10 PM](https://canada1.discourse-cdn.com/flex031/uploads/desmos/original/2X/4/4f239154da04c60db8fcc771ec3e70efbb2870a2.png)

I want it to show the shading on either condition. Like if their first guess ordered pair is correct, I want the shading to show up after they press the button. Then if they end up using all their guesses, the final press reveals the solution space. I just can’t get the first “when” to work.

I’ve tried so many different things inside of the graph and on the computation layer. I’m wondering if I what I want to happen is even possible at this point 🙈

---

<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:** [January 21, 2022, 7:33am UTC](https://cl.desmos.com/t/checking-solutions-of-linear-inequalities-systems/3980/4 "2022-01-21T07:33:42Z")

</div>

X and Y as defined in the graph CL are going to be lists, meaning your checks I\_1, I\_2, and I are also lists. Since I isn’t a number, check3 will never be true. If you define X and Y as numbers instead of lists, it should work:

```auto
number(`X`): table2.cellNumericValue(1,1)
number(`Y`): table2.cellNumericValue(1,2)

```

Side note: if you prefer students to use a single entry in coordinate notation, you can use a single math input instead of a table

```auto
myPair= parseOrderedPair(inputName.latex)
number(`X`): myPair.x
number(`Y`): myPair.y

```

---

<div class="post-metadata">

**Author:** ![Lillian\_Hart-Usher](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/lillian_hart-usher/32/3293_2.png) [@Lillian\_Hart-Usher](https://cl.desmos.com/u/Lillian_Hart-Usher)\
**Post date:** [January 21, 2022, 2:06pm UTC](https://cl.desmos.com/t/checking-solutions-of-linear-inequalities-systems/3980/5 "2022-01-21T14:06:22Z")

</div>

> [@Daniel\_Grubbs](#):
>
> ```auto
> number(`X`): table2.cellNumericValue(1,1)
> number(`Y`): table2.cellNumericValue(1,2)
> 
> ```

THANK YOU SO MUCH! I could literally cry this made me so happy
