# Randomize two conditions/blocks

Hi there
I’m pretty new to Psychopy and try to edit an existing experiment from a coworker. I think my question is pretty common, but unfortunately I did not reach to find an answer in the existing topics.

OS: Caralina 10.15.7
PsychoPy version : 2021.1.2
Standard Standalone?: yes
What are you trying to achieve?:
People will see a list of words twice (= 2 conditions). They shall rate them once if the words trigger fear(ANGST) and once if they trigger joy(FREUDE). I would like to randomize the order for fear and joy for each participant.

The inner loop “trialA” resp. “trialsB” works properly (presenting word list). They are the same, actually just the instruction is different.

What did you try to make it work?:
I put a loop around the the instruction and the trial for each condition ( = blockANGST and blockFREUDE). The loops are set to “loopType = sequential” and “nReps = 1”.

Then I put a loop around both blocks (= randomizeBlocks). This loop is set to “loopType = random” and “nReps =1”.

What specifically went wrong when you tried that?:
The experiment works, but participants always see the block “fear/ANGST” first. When i start the experiment, the block “joy/FREUDE” appears never as first block.

Hi @NS22,

loopType “random” does not mean that the routines within that loop are presented in random order. It means that the conditions of that loop (rows in the condition file) are presented in random order. So, what you probably have to do is have only one trial routine (instead of two). Around this, you have a loop with a conditions file (xlsx) containing the words you want to present sequentially. Then, you put an outer loop around the instruction routine and the inner loop with the trial in it. For this loop, you create a conditions file (xlsx) with two rows: One with the fear instruction text, and one with the joy instructions text. The outer loop is then set to “random”.

Hope that helps!