# Correct/incorrect feedback using images

**URL:** <https://discourse.psychopy.org/t/correct-incorrect-feedback-using-images/26839>\
**Category:** Builder\
**Created:** [January 15, 2022, 1:33pm UTC](https://discourse.psychopy.org/t/correct-incorrect-feedback-using-images/26839 "2022-01-15T13:33:19Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![B.D.5](https://avatars.discourse-cdn.com/v4/letter/b/e274bd/32.png) [@B.D.5](https://discourse.psychopy.org/u/B.D.5)\
**Post date:** [January 15, 2022, 5:29pm UTC](https://discourse.psychopy.org/t/correct-incorrect-feedback-using-images/26839/2 "2022-01-15T17:29:15Z")

</div>

Hello,

First, you should define the correct answer and the image path in every row cause Psychopy reads the rows one by one.  
[Equations.xlsx](https://discourse.psychopy.org/uploads/short-url/dfd4EM245Q1pVcwMQEhq5WEfUe8.xlsx) (9.7 KB)

Then, go to key\_resp component \> Data \> Store correct \> add: **$corr\_response** (the variable name the same as the new excel file above)

Then, add a new routine (HappyImage) within the same loop with the MainTask routine. Add an image component with path $Happy\_Faces  
Then add a custom code component. Write under Begin Routine (or Each Frame?):

```auto
if (key_resp.corr == 0):
    continueRoutine = False #will skip this routine if the answer is incorrect

```

Then add another routine repeat the same for the disgust. Add a routine in the same loop and add image and code components.

[untitled.psyexp](https://discourse.psychopy.org/uploads/short-url/rDZiQCmd0nGE7xmB2l7nnobGPmJ.psyexp) (5.8 KB)

Someone can correct me if I am mistaken.  
Bests

---

_[View the full topic](https://discourse.psychopy.org/t/correct-incorrect-feedback-using-images/26839)._
