# Show picture when correct/incorrect

**URL:** <https://cl.desmos.com/t/show-picture-when-correct-incorrect/1749>\
**Category:** Questions\
**Tags:** validation, correctness\
**Created:** [October 22, 2020, 1:44am UTC](https://cl.desmos.com/t/show-picture-when-correct-incorrect/1749 "2020-10-22T01:44:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeewant\_Kaushal](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jeewant_kaushal/32/1184_2.png) [@Jeewant\_Kaushal](https://cl.desmos.com/u/Jeewant_Kaushal)\
**Post date:** [October 22, 2020, 1:44am UTC](https://cl.desmos.com/t/show-picture-when-correct-incorrect/1749/1 "2020-10-22T01:44:57Z")

</div>

I’m trying to make two things happen. When the students check their answer I want a picture to show up on the graph for either correct or incorrect answer.

Here is my activity and its [slide #10](https://teacher.desmos.com/activitybuilder/custom/5f8cfd6cacaf782e8a83a8e2) that i’m trying to get this work. Thanks in advance for the help.

---

<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:** [October 22, 2020, 2:40am UTC](https://cl.desmos.com/t/show-picture-when-correct-incorrect/1749/2 "2020-10-22T02:40:52Z")

</div>

Have a number in the graph changed base on correctness.

```auto
number(`n`): when input.submitted
             (when correct 1 otherwise 0)
             otherwise 100

```

Then for one of the parameters of the correct image, add `{n=1}`. You’re just adding a restriction like you would to a function.

---

<div class="post-metadata">

**Author:** ![Jeewant\_Kaushal](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jeewant_kaushal/32/1184_2.png) [@Jeewant\_Kaushal](https://cl.desmos.com/u/Jeewant_Kaushal)\
**Post date:** [October 22, 2020, 2:54am UTC](https://cl.desmos.com/t/show-picture-when-correct-incorrect/1749/3 "2020-10-22T02:54:12Z")

</div>

Hi Daniel,

Thanks for getting back to me. My CL knowledge is like super beginner. I have been able to learn slowly by using CLs from tons of awesome people out there so far. I don’t think I fully understand yet what you are trying to say. Is there anyway you can edit my slide 10 for me to understand the code for it.

Your help is much appreciated!

---

<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:** [October 22, 2020, 3:07pm UTC](https://cl.desmos.com/t/show-picture-when-correct-incorrect/1749/4 "2020-10-22T15:07:02Z")

</div>

Sure thing. There are changes in the table, and graph CL. And in the graph itself.

> **[Slide 10: Domain and Range • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/5f919b9cd6de000caf5eb2e4)**
>
> by Daniel Grubbs

---

<div class="post-metadata">

**Author:** ![Jeewant\_Kaushal](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jeewant_kaushal/32/1184_2.png) [@Jeewant\_Kaushal](https://cl.desmos.com/u/Jeewant_Kaushal)\
**Post date:** [October 23, 2020, 6:21pm UTC](https://cl.desmos.com/t/show-picture-when-correct-incorrect/1749/5 "2020-10-23T18:21:23Z")

</div>

This is awesome! Thanks do you so much for your help on this Daniel.

If I can still bug you on this a little bit more…is there a way to keep the “x” image still hidden until they actually get the answer incorrect?

---

<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:** [October 23, 2020, 9:10pm UTC](https://cl.desmos.com/t/show-picture-when-correct-incorrect/1749/6 "2020-10-23T21:10:25Z")

</div>

I added a pressCount check. Take a look at the link above again.

You can do your own image and placement, just make sure to look at the parameters I used for the examples.

---

<div class="post-metadata">

**Author:** ![Jeewant\_Kaushal](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jeewant_kaushal/32/1184_2.png) [@Jeewant\_Kaushal](https://cl.desmos.com/u/Jeewant_Kaushal)\
**Post date:** [October 26, 2020, 6:43pm UTC](https://cl.desmos.com/t/show-picture-when-correct-incorrect/1749/7 "2020-10-26T18:43:55Z")

</div>

Thank you so much for help Daniel #GOAT
