> If so, why is a 0 never possible? > And why does d10 have 0 -> 10 while a d6 has 1 -> 6? For the purposes of this quiz, I propose that dice are 1-based. Which means a d6 has six sides numbered 1, 2, 3, 4, 5 and 6 (ie, 1->6). A d10 should be 1->10, not 0->10. There is a bunch of discussion above talking about d10 variants, but for simplicity, a N-sided die generates values from 1 to N inclusive. That is, rand(N)+1.