I am using the tutorial to try to code a 2-back test with random letters. I have only found an already opened topic here but there the issue could also not been solved.
I have tried to work through the tutorial and used the code as they used it.
This is the code i tried to run:
presentedLetters =
thisLetter = np.random.choice(letters)
presentedLetter.append(thisLetter)
n = 2
letterSelected = False
if not target:
while not letterSelected:
thisLetter = np.random.choice(letters)
if len(presentedLetters) < n or thisLetter != presentedLetters[-n]:
letterSelect = True
else:
thisLetter = presentedLetters[-n]
presentedLetters.append(thisLetter)
when running the experiment the run fails, with the error message āIndentation Error: expected an indent blockā hat the location of the first thisLetter. My code is in the BeginRoutine Tab.
I tried to use different indentations, but i am fairly new to python and psychopy and my tries were unsuccessfull.
Does anybody know a solution?
Kind Regards!