If this template helps then use it. If not then just delete and start from scratch.
PsychoPy version: 3.2.4 What are you trying to achieve?:
I am designing a cued switching task for children, where they have to sort some toys based on their color or shape. The outline of the experiment is as follows:
There will be four stimuli: Red Bear, Blue Bear, Red Car, and Blue Car.
If the cue is for color, participants have to select either blue or red color, whereas if the cue is for shape, they have to select either bear or car. So, there are four response options: A=Blue, S=Red, K=Bear, L=Car.
The problem I am facing is that I have to provide feedback after each trial, but the feedback appears to be INCORRECT, no matter what the response is. Also in the data file, resp.corr is always zero.
Thank you for your response. I checked the answers, they were indeed in capital letters. I changed them into small letters as I have entered in the experiment design. Even after changing them to small letters, resp.corr is still zero.
In one of the topics on this forum similar problem was mentioned. I tried to add that code as well as given in that topic but it didn’t work.
You should also tell the keyboard component to store just one response, rather than all of them (I’m not at my computer at the moment so am not sure how PsychoPy could judge correctness if more than one response is allowed).
The issue is regarding the same experiment. Now I am trying to run the same experiment using a touchscreen laptop. The outline of the experiment is the same. The target screen will have a target picture (Red Bear, Blue Bear, Red Car, Blue Car) at the center and four response options (Red color patch, Blue color patch, Bear drawing, Car drawing) below the target. Based on the given cue, the participant (in my case children) will have to respond by touching the appropriate response picture on the screen.
After this, in my data file I am not getting which picture has been clicked. Since, there are correct and incorrect responses, I wanted to have a column as before which stated whether the answer was correct or not by giving ‘1’ or ‘0’ in the column. This also is not shown in the data file.
I also wanted to provide feedback to the participant by highlighting the selected picture in either red or green color, based on whether the response was correct.
Please help me solving this issue.
for stimulus in stimuli:
if stimulus.contains(mouse) and stimulus.name == corrAns:
continueRoutine = False
break # end the loop on first click
Here, what will “mouse” denote? Sorry for asking silly questions, but I am not very familiar with coding so I keep getting confused with variable names to be put in the code. Also, I have four response options. So, do I have to write for loop for each response option?