Hope you’re doing well!
I have a true/false task that I want to arrange such that when a P goes through this routine, P will have the True choice on the left or the right side of the screen for all trials in the loop.
What I have done is created a rating scale that imports the choices (True or False) from two columns in my conditions file, named ‘true’ and ‘false’:
I have successfully randomized which side these appear on from trial to trial using the following code in a code component for this routine, in the BeginRoutine tab:
# make a list that holds the choices sd_choices = [true, false] # imports options from the 'true' and 'false' columns in my conditions file shuffle(sd_choices) # Options will randomly be on the right or left side of the screen: SDpractChoice = visual.RatingScale(win=win, name='SDpractChoice', marker='hover', size=1.0, pos=[0.0, -0.5],choices = sd_choices)
If False is on the left side of the screen for the first trial, I need it to stay there for all remaining trials in that loop. It could have been on the right side of the screen; that is what I want to be randomized. This will result in half the Ps haven gotten the False choice on the left side, and the other half haven gotten it on the right side (hopefully). I think the above code is being re-read each time a new trial begins, which means the sd_choices list is being re-shuffled for each repetition, leading to True or False randomly appearing on the left or right side.
How can I make this to where False will be randomly assigned to the left (or right) side of the screen for a routine, and stay there throughout the duration of the loop?
Thank you in advance for your time,