Advertisement
Guest User

Untitled

a guest
Jan 5th, 2014
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #before the loop inline script
  2.  
  3. from random import shuffle #import the shuffle function
  4. color_bank=['red','green','blue','yellow'] #creat a list with 4 colors
  5. shuffle(color_bank) #shuffle the list
  6. stim_color=color_bank.pop() #take one color out to be the first stim color
  7. next_color=color_bank.pop() #take the next one
  8. exp.set('color',stim_color)
  9.  
  10. #after display inline
  11. color_bank.append(stim_color)
  12. stim_color=next_color
  13. exp.set('color',stim_color)
  14. shuffle(color_bank)
  15. next_color=color_bank.pop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement