Hi I am working on a Psychopy experiment testing working memory. Right now I am focusing on the practice condition that contains a total of 10 trials. I have figured out the code component in order to have the practice condition end once the participant reaches an accuracy of 80% and at least 8 trials total.
Question: However, I am having difficulty with having that accuracy value reset to 0 after a total of 10 trials, in which the participant will then repeat the practice trial until they reach 80% accuracy.
Could anyone help me out this how to insert this code? Here is what I have so far:
otal_trials = total_trials + 1
count_acc = count_acc + response.corr
avg_acc = count_acc / total_trials
if(avg_acc >= 0.80 and total_trials >=8):
Practice.finished = True