Thank you for your response. I had a confusion with .contains() method.
The following code was suggested in this discourse: Writing contains(mouse) to output
this list should could just be created once per trial, in the ‘begin routine’ tab:
stimuli = [topLeftImg, topRightImg, bottomRightImg, bottomLeftImg]
and this run on every frame:
for stimulus in stimuli:
if stimulus.contains(mouse) and stimulus.name == corrAns:
thisExp.addData(‘clicked_stimulus’, stimulus.name)
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?
Thank You