1-6 would make more sense, because if I'm calling a function named after a 6-sided die (yes there are other types of die, but the 6-sided one is the Platonic form), it should return the same results as you'd expect of a 6-sided die.
The 6-sided die is, for the majority of people, the closest physical manifestation of the abstract idea of a die. Or put another way, when most people hear the word "dice"*, they imagine a 6-sided one. For comparison, Plato would say the Platonic form of a triangle is the equilateral triangle.
*For consistency I was going to stick with "die", but it would be a lie to say that when most people hear "die" they think of anything other than death.
She means that there are several types of dices, like the ones you use in a D&D game for example, that does not have 6 faces. But the de facto standard when you think about a die is the 6-sides one.
Actually, in addition to the d6 cube die, the d4 tetrahedron, d8 octahedron, d12 dodecahedron, and d20 icosahedron could all be considered Platonic as well ;)
When I began programming in Python, this is what fucked me up. Ranges include the first number, but not the second number? I would constantly forget which one is included and which one is not.
If Die(1,6) returned a number no greater than 5, that would have made sense. But this seems backwards, and anyway, there are no arguments given – surely the default would have taken that into account?
Yeah their wording was off. Ranges in Python start at the first number, but end at the last number without including it (you can think of the last number as the exit condition on a for loop)
2.7k
u/Equivalent-Bench5950 Aug 01 '22
Does that give a random number from 1 to 6?