Accuracy feedback in the same Routine

Windows 10, Version 2020.2.4, Standalone

I want to provide accuracy feedback on the same screen where participants see task stimuli. In my experiment, participants read sentences and judge whether each sentence is meaningful or not. I want participants to see accuracy % change based on the previous response on the same page where a new sentence shows up, rather than having a separate feedback screen. Now I have working code for feedback in the next Routine, how do I incorporate it as a part of the previous routine?

if trials.thisN == 0:
    number_correct = 0

if (''.join(key_resp.keys) == str(Operation_answer)):
    number_correct = number_correct + 1
    msg='Correct! \nScore = %.1f%%' %(number_correct*100/trials.nTotal)
    msgColor = 'green'
    msg='Oops! That was wrong \nScore = %.1f%%' %(number_correct*100/trials.nTotal)
    msgColor = 'red'

Just put them together with two text components


The most straightforward solution might be to simply repeat the stimulus in the next routine.

Having stimulus (plus response) and feedback in the same routine is possible, but perhaps not so straightforward:

  • Presumably you want to show the feedback only after the participant has responded. If yes, you need to set the start time of your feedback text component to “condition” and work out the condition.
  • In addition, the response can no longer end the routine, so you would need to find another way to determine the end of the routine.
  • Taken together, this is usually more trouble than it’s worth.

Hope this helps.