I’ve got a problem with coding a random Position for the Stimuli. I coded it the way it is recommended on the Psychopy help page but still I always get a ‘syntax error’. This is what I coded:
if random()>0.5: targetpos = [-0.5, 0]#on the left else: targetpos = [0.5, 0]#on the right if targetpos = [-0.5, 0] targetpos2 = [0.5,0] else: targetpos2 = [-0.5,0]
I put it in the ‘Begin routine’ section just as recommended by Psychopy.
And that is the output I get:
if targetpos = [-0.5, 0]
SyntaxError: invalid syntax
Any help would be very much appreciated!