Hello everyone. I made a motor sequence learning task using PsychoPy and would like to implement feedback. The experiment runs as follows: First, a sequence of 6 rectangles is shown on the screen. Each position of the rectangle is connected to a certain key response (w,a,s,z). After a whole sequence is shown, the participant has to respond with 6 key presses. I already implemented the correct answers and the variable Key_response.corr is storing with 0 or 1 if the response made was indeed correct.
After the response was made, i would like to show feedback. The feedback should appear after the all responses were made and not after each key press. What i would like is a screen that shows “key 2 wrong” and then “key 4 wrong”, if those keys were incorrect.
Here is the code that i have so far (inserted in Begin Routine):
the problem with this code is that it only shows the last correct condition. So even if my first key and sixth key were wrong, it will only show the feedback text for the sixth key.
feedback_text = ’ ’
if key_response.corr == 0 and Position == ‘Key1’:
feedback_text = “key 1 wrong”
if key_response.corr == 0 and Position == ‘Key2’:
feedback_text = “key 2 wrong”
if key_response.corr == 0 and Position == ‘Key3’:
feedback_text = “key 3 wrong”
if key_response.corr == 0 and Position == ‘Key4’:
feedback_text = “key 4 wrong”
if key_response.corr == 0 and Position == ‘Key5’:
feedback_text = “key 5 wrong”
if key_response.corr == 0 and Position == ‘Key6’:
feedback_text = “key 6 wrong”
here is a picture of my builder so you can imagine better how this looks like:
I think it might have to do something with that there is no loop made around the feedback block. But i am not sure.
I apologize if this is an easy fix, i just started with Psychopy 6 weeks ago.
I appreciate any ideas and tips! Thank you:)
test2.0.psyexp (71.9 KB)