Restart a experiment when finished

Hi everyone!!

I have some problems with a task I’m programming which is really simple.
I only have one loop with 40 trials because it’s only a practice task.
When the trials of the loop end, I have a routine where I can see the % of correct responses. What I wanted to do in this last routine, is to program a button or any object which was able to restart the experiment if correct responses were less than expected.

Has anyone some ideas to do something like this??. I’ll really appreciate that.

Thanks a lot in advance!!

HI @Marc_B, a simple fix would be to encase your whole task in a loop, which repeats n times until your condition is satisfied. E.g.,:

if finishCondition == True:
    superLoop.finished = True
1 Like

Hi @dvbridges !!

Thank you so much for your quickly answer!
I tried what you told me and it works perfectly!!

Thanks again!!..

Marc.