Simulating a 7-sided die from a 5-sided die

A.S.: Yep, apparently the singular of 'dice' is 'die'. 😉 A tricky programming task has been floating around the Internet which, as you might have guessed from my attempt at a pragmatic title, can be formalized as follows: Given a function that returns a uniformly random number between 1 and 5 (inclusive), design a function … Continue reading Simulating a 7-sided die from a 5-sided die