randomness-test-file 340 B

12345678910111213141516
  1. import random
  2. def normal(mu):
  3. return int(round(random.normalvariate(mu,3),0))
  4. for i in range (10):
  5. pm = random.randint(0,1)
  6. next_note = normal(2)
  7. if pm == 1:
  8. while next_note > 0:
  9. next_note = normal(2)
  10. else:
  11. while next_note <= 0:
  12. next_note = normal(-2)
  13. print(pm, next_note)