# Graphing lines immediate feedback and a final slide with a score

**URL:** <https://cl.desmos.com/t/graphing-lines-immediate-feedback-and-a-final-slide-with-a-score/8597>\
**Category:** Questions\
**Created:** [February 27, 2026, 7:03pm UTC](https://cl.desmos.com/t/graphing-lines-immediate-feedback-and-a-final-slide-with-a-score/8597 "2026-02-27T19:03:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Harmless](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/matt_harmless/32/6497_2.png) [@Matt\_Harmless](https://cl.desmos.com/u/Matt_Harmless)\
**Post date:** [February 27, 2026, 7:03pm UTC](https://cl.desmos.com/t/graphing-lines-immediate-feedback-and-a-final-slide-with-a-score/8597/1 "2026-02-27T19:03:52Z")

</div>

> **[AGS Algebra 2 Chapter 2 Lesson 4 • Activity by Matt Harmless](https://classroom.amplify.com/activity/699f467b3b4f963208983f32?collections=699f2369bcc1a2398740f9b3&utm_campaign=share&utm_content=activity)**
>
> by Matt Harmless

Here is an activity based on an assignment.

Right now I have it almost working exactly the way I want it to, but it is still saying a graph is correct if the slope is right OR if the y-intercept is right. So, it confuses students who have just one part right and it is telling them the whole thing is right. Not sure how to fix it.

Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![Matt\_Harmless](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/matt_harmless/32/6497_2.png) [@Matt\_Harmless](https://cl.desmos.com/u/Matt_Harmless)\
**Post date:** [February 27, 2026, 7:17pm UTC](https://cl.desmos.com/t/graphing-lines-immediate-feedback-and-a-final-slide-with-a-score/8597/2 "2026-02-27T19:17:52Z")

</div>

Allow me to add a clarification.

Everything works… EXCEPT… The graph will show that it is correct as long as one component is correct.

---

<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 1, 2026, 7:01pm UTC](https://cl.desmos.com/t/graphing-lines-immediate-feedback-and-a-final-slide-with-a-score/8597/3 "2026-03-01T19:01:17Z")

</div>

In your graph, you have `I(x,y) = {m=3,b=0:1,0}`. The comma makes this an “or” statement, so either being correct returns true. If you want to require both, you can use one as a restriction to the other `I(x,y) = {m=3{b=0}:1,0}`. Alternatively, you can use a number sink that uses your CL correctness to define it, instead of correcting in the graph. Is this what you mean?

---

<div class="post-metadata">

**Author:** ![Matt\_Harmless](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/matt_harmless/32/6497_2.png) [@Matt\_Harmless](https://cl.desmos.com/u/Matt_Harmless)\
**Post date:** [March 2, 2026, 12:57pm UTC](https://cl.desmos.com/t/graphing-lines-immediate-feedback-and-a-final-slide-with-a-score/8597/4 "2026-03-02T12:57:05Z")

</div>

That’s it!

I’m getting better with the CL terminology and can usually track that, but the specifics in the graphs feels almost foreign.

---

<div class="post-metadata">

**Author:** ![Meenu\_Agarwal](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/meenu_agarwal/32/4901_2.png) [@Meenu\_Agarwal](https://cl.desmos.com/u/Meenu_Agarwal)\
**Post date:** [March 4, 2026, 8:42pm UTC](https://cl.desmos.com/t/graphing-lines-immediate-feedback-and-a-final-slide-with-a-score/8597/5 "2026-03-04T20:42:35Z")

</div>

* * *

**noteProblem(NOTE: CL CODE)**

line = `y=1/2x-6`  
m = xyLine(line).slope  
b = xyLine(line).yIntercept

**For Feedback (NOTE: CL CODE)**  
hidden: not(graph.script.correct)

**graph(Graph: CL CODE)**

xTransform = simpleFunction(`x`,`x`,`y`) # Change all x values to themselves (x)  
yTransform = simpleFunction(`0`,`x`,`y`) # Change all y values to 0.  
flatten = this.sketch.transform(xTransform,yTransform)

xMin = min(flatten.xValuesAt(0))  
xMax = max(flatten.xValuesAt(0))

number(`x_{min}`): xMin  
number(`x_{max}`): xMax

number(`y_{min}`): max(this.sketch.yValuesAt(xMin))  
number(`y_{max}`): max(this.sketch.yValuesAt(xMax))

number(`m_{actual}`):noteProblem.script.m  
number(`b_{actual}`):noteProblem.script.b

correct = this.number(`C`)=1  
correct: correct

# _ **Try the above code. Hopefully it helps a little.** _

---

<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 4, 2026, 9:09pm UTC](https://cl.desmos.com/t/graphing-lines-immediate-feedback-and-a-final-slide-with-a-score/8597/6 "2026-03-04T21:09:00Z")

</div>

You’re using a bunch of code that works for sketches, but graphs don’t have the same sources. For example, `.xValuesAt()` is only for something sketched, and doesn’t work with values within a graph. Good thought though!
