-2

Help me creating a python list of random numbers between 0 to 100, with every succeeding number having a difference of 2 between them.

Adl
  • 3
  • 2

1 Answers1

-1

You have an Explanation here: Create random sequence of integers within a range and with a minimum distance between them

Just modify these parameters to match your case:

n = 5
limit = 20
mingap = 3
slack = 20 - mingap * (n - 1)
Niv Dudovitch
  • 1,614
  • 7
  • 15