I’ve created a task where people can win 20p on certain trials if they respond quickly enough. I’m trying to sum the total money won as the task goes along.
This is what I’ve done so far -
money_won_this_trial = 0 total_money = 0
if target_resp_M.keys == 'space': if Feedback=='20p.jpg': money_won_this_trial=money_won_this_trial + 0.20 else: money_won_this_trial=0 total_money=money_won_this_trial + total_money thisExp.addData('total_money', total_money)
total_money in the output is successfully showing money_won_this_trial, but it doesn’t record the total money won as the task goes along which is what I want.
Any help anyone could offer on this would be greatly appreciated! Thank you very much!