Advertisement
Guest User

Untitled

a guest
Apr 1st, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. from random import shuffle
  2.  
  3. #create a list of the number of blocks that you need. Always start at 0. Here I have eight blocks Here I have eight blocks.
  4.  
  5. block_list = [0, 1, 2]
  6.  
  7. #randomize the list that you just made
  8. shuffle(block_list)
  9.  
  10. #create variables that will be used to help randomize later in your MainSequence. The number of variables depends on the number of blocks you have in your experiment (and should correspond to how many are in the block_list). So if you have only 3 blocks, you would use b0, b1 and b2.
  11.  
  12. b0 = block_list[0]
  13. b1 = block_list[1]
  14. b2 = block_list[2]
  15.  
  16. #Make these variables part of the experiment
  17.  
  18. exp.set('b0',b0)
  19. exp.set('b1',b1)
  20. exp.set('b2',b2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement