SmileBASIC Community
Taylormonovae1324
Open
Closed
Hint
biased randomness
so if you want to generate "random" numbers but want one number to appear more often, you need modular division. say I have 0,1,2 and I want 0 the most. what I do is take rnd(4), which gives me 0,1,2,3. now if I take (rnd(4) mod 3), I get 0,1,2,0. the 0 now shows up twice as much as the others. rest in comments
Advertisement
Add a Comment
Report Violation to Miiverse Administrators
You are about to report a post with content which violates the Miiverse Code of Conduct. This report will be sent to Nintendo's Miiverse administrators and not to the creator of the post.
Report Violation to Miiverse Administrators
You cannot report posts made automatically by a software title.





