I’m trying to programme a task, where participants see a series of numbers : [1 5 3 8 1] in which each numbers correspond to a letter.
Problem: currently, both the correct and incorrect answers can continue the task
What I’m trying to do:
if it is incorrect, the same number of sequence does not change, the participant have to get the answers correctly in order to continue to the next sequence.
If it is incorrect, you get the message “Incorrect, please try again”, while the correct answers takes participant to the next number of sequence
It’s difficult to (safely) make a loop which truely infinite, but you could make a loop with a number of repetitions participants are unlikely to reach (say, 100) and add code to break this loop early if they get the answer right. This would go in the End Routine tab of a Code Component and would look like this:
Thank you for your response. I’m trying to set up a display of correct and incorrect answers, as well as the amount of answers achieved in the following codes:
Begin Experiment:
Obviously the correctletters matched the input, but I just don’t understand why correct answer is 0 (supposed to be 1) and on the screen, it shows that I have put in the incorrect answer. Would you be able to help?
What happens if you print just captured_string == correctletters2? Does it show True or False? If it’s False then there must be some subtle difference between the two - maybe some spaces at the beginning or end?
I printed captured_string == correctletters2 and it shows True. I also printed the lengths of the characters and input, they are the same length. I’m not sure why it’s still not giving me the correct and incorrect feedback