Given
:
I was given a function that generates randomly 0 or 1. It generates 0 with probability p and 1 with probability 1-p.
Requirement
:
I need to create a function that generates a number between 0 and 6 randomly with uniform probability by utilizing the above given function.
Note:cant use inbuilt random functions.
Can someone help me with this.
Thanks in advance