Question: Write a program that simulates rolling a 1 6 - sided die. Use a for loop to generate 1 0 random numbers from the 1

Write a program that simulates rolling a 16-sided die. Use a for loop to generate 10 random numbers from the 16-sided die (10 should be defined as a variable).
Print those 10 numbers.
Your program should calculate the sum and the average of those numbers using a sum accumulator.
In a sentence, display the sum and average.
Your code should work even if you use a different number of random numbers generated (i.e. even if you change 10).

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!