Skipping the loop within the loop when return back

OS** (e.g. Win10): Win10
PsychoPy version** (e.g. 1.84.x): v2020.2.0
Standard Standalone? (y/n)** If not then what?: y

There are two study loops at the beginning of the experiment, sequential and random. In the testing phase of the experiment, it returns to the study phase when the wrong answer is given. How can I skip the random loop when return back to study phase?

p.s. The experiment will be running online

Thanks in advance

Set nReps for random_loop as a variable, e.g. nRand

Put nRand=1 in a Begin Experiment code tab

Then set it to 0 after the loop has finished

Thank you very much for your help. I put nRand=1 in a Begin Experiment code tab.
Where should I put nRand = 0?

Anywhere inside the loop or after it (Begin or End Routine) but somewhere in testbegin might be cleanest.

1 Like