Sale!

 Dice rolling simulation module

Original price was: $35.00.Current price is: $25.00.

Category:
5/5 - (2 votes)

Dice rolling simulation module
Write a program that uses the random module to simulate rolling dice.
To obtain a random number between 1 and 6 use the following relationship:

roll = rand_number % 6 + 1

keep track of the number of rolls per each die in a list called rolls (declare it as rolls = [0,0,0,0,0,0]) and “roll” the die 10000 times.
When done, print out the statistics like this:

1 – 1685

2 – 1662

3 – 1669

4 – 1657

5 – 1651

6 – 1676

 

create a dice module and put this code in module directory.

Due: Tuesday, 19 November 2019, 8:00 AM

Scroll to Top