Hi. I think this question has already asked but I could not solve it by looking at the similar subjects.
I want to simply ask participants whether they have seen a word in the previous trials. So, I created a routine, a text which set to be the words and two rectangles below it (yesBox and noBox). Then I created a mouse (mouseMemory):
What I want is to add the correct or wrong response of the participants to the output. So, I wrote the code below:
#Begin Experiment tab #10 words that have been presented in the previous section existWords = [“hammers”, “cats”, “skyscrapers”, “racehorses”, “politicians”, “reptiles”,“Volvos”, “dollars”,“eucalyptus”] memoryCorrect = 0 #End Routine tab if mouseMemory.isPressedIn(yesBox): if words in existWords: memoryCorrect = 1 else: memoryCorrect = 0 if mouseMemory.isPressedIn(noBox): if words in existWords: memoryCorrect = 0 else: memoryCorrect = 1 thisExp.addData (“memoryCorrect”, memoryCorrect)
But in my output file, in the memortCorrect column, I always have 0 in all rows. I would appreciate any help.