Displaying the final score

Hello

use the code-component in the routine feedbackrout and change the code from

if key_resp.corr:
    msg = '√'
else:
    msg = '×'

to

if key_resp.corr:
    msg = '√'
    score += 1
else:
    msg = '×'

Initialize score in the Begin Experiment tab.

score = 0

Delete the code in the code-component code_3 in the routine total_score.

Insert the following in the code-component code_3 in the Begin Routine tab.

msgTotalScore = str(score)

Refer to msgTotalScore in your text-component score_text.

grafik

Best wishes Jens

1 Like