Hello,
My colleague and I want to create a program on psychopy in which we enter an anxiety questionnaire. However, some of the items in this questionnaire need to be coded reversly (1= 4 , 2 = 3 , 3 = 2, 4 = 1).
Although we have succeeded in creating the loop to integrate the rating scale, we are unable to program the reverse coding of the items concerned.
Could someone please tell me the cause of the problem, please?
To do so we insert a Routine in the loop (just after the trial) and entered in the custom “code” :
ratingScale=visual.RatingScale(win)
if Scoring=='normal':
revscore=ratingScale.getRating()
thisExp.addOtherData("revscore", revscore)
elif Scoring=='reverse':
revscore=(5 - (ratingScale.getRating()))
thisExp.addOtherData("revscore", revscore)
Thanks in advance