I am running PsychoPy v2023.2.3 on a Mac.
In my experiment, we have a list of decimal pairs in a spreadsheet along with a column to identify if the pair is congruent or not (if it is congruent, the decimal with two digits is larger than the decimal with one digit.) I have this in a loop surrounding the routine currently, with the loopType set to random and the spreadsheet as the condition file.
In the builder, I have two text components, one to display a decimal on the left of the screen, and one to display a decimal on the right of the screen. The participant then is supposed to press the “F” or “J” key to indicate which number is bigger, which I have a keyboard response component for.
I need to write code so that when the rows in the spreadsheet are randomized, no more than three consecutive trials are incongruent or congruent. I have spent some time tinkering around in ChatGPT trying to get a script to work, but I am struggling with getting the code to output something that can be fed into the builder components for display of the stimuli. Below I have attached the code I have been trying to use, but hasn’t been working (I have also run into an issue where PsychoPy says I do not have the right version of openpxl, even though when I run it in my Mac’s terminal, it says I have the fully updated version.)
Any insight would be greatly appreciated!