Random routine for half of participants

Hello,

I’m looking for a way to have my “JOC phase” (see attached file) presented after the stimulus only for half participants (randomly) and for the others just the stimulus
How can I do this?

Thank you for your help,

Milèna

You could add the following code component in your JOC routine.

Begin Experiment

showJOC = randint(0,2)

Begin Routine

if showJOC == 0:
     continueRoutine = False

Hello,

It works perfectly, thank you !

Milèna