Dear Psychopy Community:
How can I write a code in the feedback to execute this command?
When you see the image of the “glass”, press the “a” key, and whenever you hear the sound of the “glass”, press the “l” key.
If the participant answers correctly, play a green emoji for the images and a pleasant sound for the sounds. And if he does not recognize or lose the image or sound of the “glass”, a red emoji or an unpleasant sound will play.
Also, the participant should not respond to any other image such as radio and any other sound and should not receive any feedback.
I wrote this code but it does not work properly.
These are my codes
if CorrectAns:
msg = 'D:\PHD PROJECT\Selected Material for Intervention\CorrectFeedback.jpg'
correctNumber = correctNumber + 1
else:
msg = 'D:\PHD PROJECT\Selected Material for Intervention\IncorrectFeedback.jpg'
if CorrectAns:
msg = 'D:\PHD PROJECT\Selected Material for Intervention\Pleasantsound.ogg'
correctNumber = correctNumber + 1
else:
msg = 'D:\PHD PROJECT\Selected Material for Intervention\Unpleasantsound.ogg'
Thank you in advance for your great help!