# How can I provide different responses to different answers

**URL:** <https://cl.desmos.com/t/how-can-i-provide-different-responses-to-different-answers/2997>\
**Category:** Questions\
**Tags:** validation, correctness\
**Created:** [March 25, 2021, 3:47pm UTC](https://cl.desmos.com/t/how-can-i-provide-different-responses-to-different-answers/2997 "2021-03-25T15:47:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rachel\_Kessous](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/rachel_kessous/32/2477_2.png) [@Rachel\_Kessous](https://cl.desmos.com/u/Rachel_Kessous)\
**Post date:** [March 25, 2021, 3:47pm UTC](https://cl.desmos.com/t/how-can-i-provide-different-responses-to-different-answers/2997/1 "2021-03-25T15:47:20Z")

</div>

I have the coding to tell a student if an answer is correct or not, but if students rounded to the tenths instead of the hundredths place (which will be a very common error as the calculator that is embedded in the math input rounds to 6 digits), I want a response to tell them that they rounded incorrectly for that specific answer.

I don’t understand coding that well and usually copy and paste CL and then edit it to make it work for me. I’m guessing I would need to set a variable to that value or something, but I’m not really sure how to do it.

Also- I can’t figure out why my slides 7, 13 and 14 aren’t checking if they are correct in my teacher summary.

Here is my activity: [Compound Interest Advanced Algebra • Activity by Rachel Kessous](https://teacher.desmos.com/activitybuilder/custom/60427be61314653cd7866774)  
Slide 14

Thank you so much in advance!!!

---

<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 25, 2021, 3:59pm UTC](https://cl.desmos.com/t/how-can-i-provide-different-responses-to-different-answers/2997/2 "2021-03-25T15:59:04Z")

</div>

Change your feedback to this. Note I changed the order a little, so you don’t need to keep using “and practice.submitted”.

```auto
content: "${feedback}"

feedback = 
  when not(practice.submitted) ""
  when practice.script.correct "Correct! Nice job!"
  when numericValue(`\round(${practice.numericValue},2)`)=14800.86 "Oops! You didn't round your answer correctly."
  otherwise "Incorrect. Try again!"

```

You’ll also need to have a `correct:` sink (or readOnly:true) for the first input if you want a checkmark on the dashboard.

---

<div class="post-metadata">

**Author:** ![Rachel\_Kessous](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/rachel_kessous/32/2477_2.png) [@Rachel\_Kessous](https://cl.desmos.com/u/Rachel_Kessous)\
**Post date:** [March 26, 2021, 2:52pm UTC](https://cl.desmos.com/t/how-can-i-provide-different-responses-to-different-answers/2997/3 "2021-03-26T14:52:30Z")

</div>

Thank you so much for that feedback!!! I forgot about the otherwise… of course!

I’m still trying to get the 14th slide to show a check mark, but when I add readOnly: true to the text inputs, it gives me the error "Could not find sink “readOnly”. How do I get it to not look at the text inputs and only look at the table to determine if it is correct and provide the checkmark on the dashboard?

Thank you again so much for your 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:** [March 26, 2021, 4:08pm UTC](https://cl.desmos.com/t/how-can-i-provide-different-responses-to-different-answers/2997/4 "2021-03-26T16:08:14Z")

</div>

`readOnly: true` only works with components that can be corrected using a `correct:` sink. Text inputs and explain prompts cannot be auto graded, so it won’t work for those, and at best you will get a dot on the dashboard (or an X if something is 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:** [March 26, 2021, 4:44pm UTC](https://cl.desmos.com/t/how-can-i-provide-different-responses-to-different-answers/2997/5 "2021-03-26T16:44:06Z")

</div>

I think you had an otherwise. It was just the result for unsubmitted responses. I like the above order because it cleans the code up a little more (i.e. not needing `.submitted` on numerous lines).
