I have a routine where participants are given 2 items from a list of 3 items that they generated and are asked to fill in (by typing) the 3rd item that is not presented on screen.
I want three extra columns in my output data file labelled: correct, incorrect, and missed.
Right now, I have a column named ‘Target’ and one named ‘Response’.
Currently, this is the code I have:
thisExp.addData('Response', inputText) inputText="" Response = inputText.lower() thisExp.addData('Correct', int(Response == Target)) thisExp.addData('Incorrect', int(Response != Target)) thisExp.addData('Missed', int(Response == 'pass'))
The problem is that no matter what a participant types in, it is always marked under the ‘incorrect’ column.
Additionally, when asked to print the Response and Target columns, only the items in the Target column are being printed which makes me think that maybe there is an error somewhere in the coding of the Response column.
Thanks in advance for your help!