Can random(5) output the number 5?

but I suppose with round the probability distribution is not the same when n>1.

e.g., when n = 2,

  • 0.0-0.50 (25%)
  • 0.5-1.51 (50%)
  • 1.5-2.02 (25%)
2 Likes