Exit loop: in_code: Begin Experiment: myCount = 0 Begin Routine: myCount = myCount + 1 if myCount > 3: loop_practice.finished = True #loop_practice = loop name Break/routine/loop + keyboard: Each Frame: key = kb_end_training.keys if key == 'y': continueRoutine = False elif key == 'n': practice.finished=True continueRoutine = False Feedback: Begin Routine: # feedback statement: if kb_component.corr: # equivalente a kb_component.corr == 1 msg = "Correct! RT={:.3f}".format(kb_component.rt) else: msg = "Oops! That was wrong" Controbilanciamento 2 blocks: In-code routine Begin Routine: num = int(expInfo["participant"]) if (num % 2) == 0: nb_loop_ita = 0 nb_loop_eng = int(expInfo['eng']) else: nb_loop_ita = int(expInfo['ita']) nb_loop_eng = 0 Loop Exp{ Loop1{} Loop2{} In-code routine Begin Routine: temp = nb_loop_ita nb_loop_ita = nb_loop_eng nb_loop_eng = temp } add data: thisExp.addData("nome_colonna", "data")