> " tries again.... In other words, digit(s) modulo"
"Try again" and "modulo" do not mean the same thing.
Try again means you discard a result outside of the range, and then generate a new number without any reference to the value of the first try. If you have 7 kids and you're picking 0-9, you discard any results of 7-8-9 (or 8-9-0) and try again.
Modulo means you take a result outside of the range, divide it by the range, and use the remainder (which is guaranteed to be in the range) as your new answer. The problem with this approach is that it's not evenly distributed -- if you have 7 kids and digits 0-9, three of your kids will get double chances. Even if you use 0-59 as your range, some of the kids will have 9 chances and others will have 8 chances.
"Try again" and "modulo" do not mean the same thing.
Try again means you discard a result outside of the range, and then generate a new number without any reference to the value of the first try. If you have 7 kids and you're picking 0-9, you discard any results of 7-8-9 (or 8-9-0) and try again.
Modulo means you take a result outside of the range, divide it by the range, and use the remainder (which is guaranteed to be in the range) as your new answer. The problem with this approach is that it's not evenly distributed -- if you have 7 kids and digits 0-9, three of your kids will get double chances. Even if you use 0-59 as your range, some of the kids will have 9 chances and others will have 8 chances.