Given a function Rand01Uniform() which generates a random integer number from [0,1] with a uniform distribution, write a function Rand06Uniform() which generates a random integer number from [0,6] with a uniform distribution.
phone interview May 2017

@eleHaj
Flip Rand01Uniform 3 times, and associate each result as follows:
000: 0
001: 1
010: 2
011: 3
100: 4
101: 5
110: 6
111: reflip# R = Rand01Uniform def Rand06Uniform(): while True: roll = 4 * R() + 2 * R() + R() if roll < 7: return roll