OS (e.g. Win10): Macbook
PsychoPy version (e.g. 1.84.x): 2021.2.3
What are you trying to achieve?:
After participants read the instructions, they complete a series of questions to check they understand what their task is. After participants make their responses, I would like feedback to appear saying “Correct” or “Incorrect - Try again” and then if they answer incorrectly I would like them to repeat the question until they answer correctly.
The problem is that I am unable to find code or instructions on how to do this when participants respond using the “Rating Scale” as opposed to them simply pressing a button or responding using a “Slider”.
What did you try to make it work?:
I have attempted to use code from previous forum posts such as: https://discourse.psychopy.org/t/repeat-loop-if-incorrect/5805 and code from Chapter 6 in the PsychoPy book itself. For example, I added the following code:
Begin Routine Tab
if Fam_Check_Response.response == Correct
msg = "Correct!"
msgColor = "green"
continueRoutine = True
else:
msg = "Incorrect, please try again"
msgColor = "red"
continueRoutine = False
What specifically went wrong when you tried that?:
I have several syntax errors that I do not know how to fix… for example, I get the following error:
/* Syntax Error: Fix Python code */
I have added the relevant files and code here required to run the experiment.
Any help would be greatly appreciated, I plan to run this online!
Best,
Paige
Example.psyexp (47.2 KB)
P1_Fam_Example.xlsx (9.8 KB)