Dice Rolls From Continuous Uniform
Start Timer
0:00:00
You are given a function that generates a floating-point number between 0 and 1 from a continuous uniform distribution.
Write a function dice_roll that uses the continuous random generator (continues_random_function in the starter code) and simulates a dice roll (return a number between 1 and 6, with all numbers having a uniform distribution).
Example:
Output:
dice_roll() -> 1
dice_roll() -> 2
dice_roll() -> 6
#and so on ...
.
.
.
.
.
.
.
.
.
Comments