Question: Use a function from the Python random module. The random module helps us to generate random numbers for playing a dice game. Write a program

Use a function from the Python random module.

The random module helps us to generate random numbers for playing a dice game. Write a program (called RandomNumbers.py) that uses the randint function from the random module to generate and display 50 random numbers between 1 and 6 that can be rolled with a dice.

After displaying the 50 random numbers, the program also displays the counts of 1's, 2's, 3's, 4's, 5's and 6's.

Submit your code.

Sample output will be:

Average of 50 random numbers: 3.56

Total number of 1s: 7 Total number of 2s: 9 Total number of 3s: 7 Total number of 4s: 10 Total number of 5s: 9 Total number of 6s: 8

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!