# System of Linear Inequalities: Solid Line vs Dashed Line Coding issue

**URL:** <https://cl.desmos.com/t/system-of-linear-inequalities-solid-line-vs-dashed-line-coding-issue/4613>\
**Category:** Questions\
**Created:** [December 12, 2022, 7:59pm UTC](https://cl.desmos.com/t/system-of-linear-inequalities-solid-line-vs-dashed-line-coding-issue/4613 "2022-12-12T19:59:00Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![fervegacid](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/fervegacid/32/4002_2.png) [@fervegacid](https://cl.desmos.com/u/fervegacid)\
**Post date:** [December 12, 2022, 7:59pm UTC](https://cl.desmos.com/t/system-of-linear-inequalities-solid-line-vs-dashed-line-coding-issue/4613/1 "2022-12-12T19:59:00Z")

</div>

Hi everyone:

I have created this activity to graph System of Linear Inequalities. Everything is working, only issue is that my Red Line, the solid or dashed button is not working like the Blue Line. it stays red all the time, while the blue, first is gray before I choose the type of line I want, then, it turn solid blue or dashed blue. I want the same happens to my red line, before selection “gray” then, with the selection, solid red or dashed red.

Here is the link to my activity:

> **[Need Help with Solid Line/Dashed Line code for my RED LINE only • Activity...](https://teacher.desmos.com/activitybuilder/custom/63978656111222e079080603)**
>
> by Fernando Vega-Cid

Also, I want to make sure the coding for the Submit button is correct. We are one week from the midterm and I need this desperately. Please HELPPPP!!!..

Thank you so much in advance for your attention.  
Mr. Vega-Cid  
Math Teacher  
Fort Lauderdale High School - FLORIDA

---

<div class="post-metadata">

**Author:** ![ianmcmeek](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/ianmcmeek/32/3966_2.png) [@ianmcmeek](https://cl.desmos.com/u/ianmcmeek)\
**Post date:** [December 12, 2022, 9:01pm UTC](https://cl.desmos.com/t/system-of-linear-inequalities-solid-line-vs-dashed-line-coding-issue/4613/2 "2022-12-12T21:01:15Z")

</div>

Hi! It looks like you need one more line of code in the graph CL to link up the definition for `C_{hoice1}`:

```auto
number(`C_{hoice1}`): when redline.isSelected(1) 1 when redline.isSelected(2) 2 otherwise 3

```

Two quick noticings/questions -

1. I _think_ that the blue line needs to be dashed and the red line needs to be solid, the reverse of what is marked correct currently, but it has been a long time since I’ve worked with systems of inequalities.
2. Is it intentional that the blue line is initially y = 7x - 2 ? The red line starts out already correct, so I wanted to double check.

I hope that helps! You and your students are going to rock the midterm 🙂

---

<div class="post-metadata">

**Author:** ![fervegacid](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/fervegacid/32/4002_2.png) [@fervegacid](https://cl.desmos.com/u/fervegacid)\
**Post date:** [December 12, 2022, 10:39pm UTC](https://cl.desmos.com/t/system-of-linear-inequalities-solid-line-vs-dashed-line-coding-issue/4613/3 "2022-12-12T22:39:00Z")

</div>

Thank you so much for your answer. I agreed, I think my problem is on the graph coding and then, the CL coding itself.

Could you please, take a look of the graph coding? if you can.

Thank you so much for your help.  
Fernando

---

<div class="post-metadata">

**Author:** ![ianmcmeek](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/ianmcmeek/32/3966_2.png) [@ianmcmeek](https://cl.desmos.com/u/ianmcmeek)\
**Post date:** [December 12, 2022, 11:08pm UTC](https://cl.desmos.com/t/system-of-linear-inequalities-solid-line-vs-dashed-line-coding-issue/4613/4 "2022-12-12T23:08:48Z")

</div>

Does this copy of your activity look and behave the way you want?

> **[\[Copy of\] Need Help with Solid Line/Dashed Line code for my RED LINE only •...](https://teacher.desmos.com/activitybuilder/custom/639791d61b3dc7bee40804ef)**
>
> by Ian M

I indicated where I made edits with comments in all caps in hopes of making them easy to find.

---

<div class="post-metadata">

**Author:** ![fervegacid](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/fervegacid/32/4002_2.png) [@fervegacid](https://cl.desmos.com/u/fervegacid)\
**Post date:** [December 12, 2022, 11:21pm UTC](https://cl.desmos.com/t/system-of-linear-inequalities-solid-line-vs-dashed-line-coding-issue/4613/5 "2022-12-12T23:21:53Z")

</div>

WOWWWWWWW…  
Yes!! You are my savior and now I can finish setting up my midterm.  
You rock  
Thank you so much!!!..

---

<div class="post-metadata">

**Author:** ![ianmcmeek](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/ianmcmeek/32/3966_2.png) [@ianmcmeek](https://cl.desmos.com/u/ianmcmeek)\
**Post date:** [December 12, 2022, 11:53pm UTC](https://cl.desmos.com/t/system-of-linear-inequalities-solid-line-vs-dashed-line-coding-issue/4613/6 "2022-12-12T23:53:46Z")

</div>

You’re welcome. Good luck with the midterm; I’m sure it will be great!

---

<div class="post-metadata">

**Author:** ![fervegacid](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/fervegacid/32/4002_2.png) [@fervegacid](https://cl.desmos.com/u/fervegacid)\
**Post date:** [December 13, 2022, 12:34am UTC](https://cl.desmos.com/t/system-of-linear-inequalities-solid-line-vs-dashed-line-coding-issue/4613/7 "2022-12-13T00:34:31Z")

</div>

Ian:

Sorry to bother you. One last question: Did you see on the graph code all the warning signs on the side that says: "You’ve defined ‘O\_n’ in more than one place. Try deleting some of the definitions of ‘O\_n’.

One more: Can I hide from the students the component Here are your results?

I am trying to use the Correctness button and is not working. If this works, I don’t need to show the students if they are correct or no, I will see the results on my dashboard.

Thank you for all your help on this matter…

> **[\[Copy of\] \[Copy of\] Need Help with Solid Line/Dashed Line code for my RED...](https://teacher.desmos.com/activitybuilder/custom/6397b7b9239f16ebe7388819)**
>
> by Fernando Vega-Cid

---

<div class="post-metadata">

**Author:** ![ianmcmeek](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/ianmcmeek/32/3966_2.png) [@ianmcmeek](https://cl.desmos.com/u/ianmcmeek)\
**Post date:** [December 13, 2022, 1:40am UTC](https://cl.desmos.com/t/system-of-linear-inequalities-solid-line-vs-dashed-line-coding-issue/4613/8 "2022-12-13T01:40:48Z")

</div>

Happy to help!

To make the warnings go away, scroll down to lines 49-50 in the graph. There were two copies of `O_n=1`, and you can delete the second one (result shown).  
 ![image](https://canada1.discourse-cdn.com/flex031/uploads/desmos/original/2X/d/d4ed4196fdfa21bc46e4aa523d52aa5459965e43.png)

Can you describe what is not working about the correctness? What I am seeing for the dashboard preview right now matches my expectations.  
To hide “Here are your results…” from students, you could just delete the note. If you want to keep the note around just in case, you could also go into the script and change the last line of the script to `hidden: true`

---

<div class="post-metadata">

**Author:** ![fervegacid](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/fervegacid/32/4002_2.png) [@fervegacid](https://cl.desmos.com/u/fervegacid)\
**Post date:** [December 13, 2022, 2:00am UTC](https://cl.desmos.com/t/system-of-linear-inequalities-solid-line-vs-dashed-line-coding-issue/4613/9 "2022-12-13T02:00:02Z")

</div>

I am trying to split the shading buttons as I did with the lines. One turn on button for the blue line and one for the red line but, I am making some mistake on the graphing coding.

This is the first time using Desmos for me this way.

I imagine that after I changed the coding in the graph to has two different shading buttons, I have to modify the correctness coding as well.

Here you can see the same activity, first one with the split and the second one with just one button.

What do you think?

> **[\[Copy of\] \[Copy of\] Need Help with Solid Line/Dashed Line code for my RED...](https://teacher.desmos.com/activitybuilder/custom/6397b7b9239f16ebe7388819)**
>
> by Fernando Vega-Cid

---

<div class="post-metadata">

**Author:** ![ianmcmeek](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/ianmcmeek/32/3966_2.png) [@ianmcmeek](https://cl.desmos.com/u/ianmcmeek)\
**Post date:** [December 13, 2022, 4:47pm UTC](https://cl.desmos.com/t/system-of-linear-inequalities-solid-line-vs-dashed-line-coding-issue/4613/10 "2022-12-13T16:47:40Z")

</div>

I like the changes! What about this for checking correctness?

> **[\[Copy of\] Question 20: Graphing System of Linear Inequalities • Activity...](https://teacher.desmos.com/activitybuilder/custom/6398a7bd4ae1176b8a5ecd3b)**
>
> by Ian M

Sorry for changing many things at once - I set the graph to check correctness for the slope & intercept of each line and the individual buttons to check the solid/dashed lines and shading. You could also keep all the correctness checks in one component (more like what was there before), but maybe the checks are easier to understand as a teacher when it’s spread out.

---

<div class="post-metadata">

**Author:** ![ymmtgnzls](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/ymmtgnzls/32/5235_2.png) [@ymmtgnzls](https://cl.desmos.com/u/ymmtgnzls)\
**Post date:** [May 30, 2024, 5:10am UTC](https://cl.desmos.com/t/system-of-linear-inequalities-solid-line-vs-dashed-line-coding-issue/4613/11 "2024-05-30T05:10:56Z")

</div>

Hello, any thoughts on how to setup the values of m and b for vertical lines? For example, one of the inequalities is x\>5, how do I set that up? I figured out how to do it with other lines with a slope but not this one. Thanks in advance!
