I want to randomise the orientation of my stimuli, I can do this through python by simply
a = [90,180,270,360]
LetterOri = (random.choice(a))
However I know this will not work online, as you can’t import packages online.
Is there I way I can do this without relying on the random package?
ori = [90,180,270,360]
orientation = ori.pop()
You might need to change manually
You posted in Online experiments, so I assume that you will run the experiment online. Do not import libraries (e.g. import random). That will not work online.The Builder will import all libraries for which there are PsychoJS counterparts.
Best wishes Jens
Thank you so much!
Yeah I’ve had issues in the past where I built my experiment using import random, then found it wouldn’t work online. So I definitely learned my lesson there.