JavaScript positif atau negatif acak

Math.random() < 0.5 ? -1 : 1;
new python programmer