Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #before the loop inline script
- from random import shuffle #import the shuffle function
- color_bank=['red','green','blue','yellow'] #creat a list with 4 colors
- shuffle(color_bank) #shuffle the list
- stim_color=color_bank.pop() #take one color out to be the first stim color
- next_color=color_bank.pop() #take the next one
- exp.set('color',stim_color)
- #after display inline
- color_bank.append(stim_color)
- stim_color=next_color
- exp.set('color',stim_color)
- shuffle(color_bank)
- next_color=color_bank.pop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement