Question: Write program that uses a function named throwDie that simulates throwing a die. When you call the function, it should generate a random number in
Write program that uses a function named throwDie that simulates throwing a die. When you call the function, it should generate a random number in the range of 1 through 6. Demonstrate the function in a program that asks the user how many times the die should be thrown, then simulates the throwing of the die that number of times. At the end of the program display the number of times each value appears. Note: Your solution MUST have and call a function to do the die throw in order to get full credit for this assignment!
The output should look something like this: How many die throws should I make? 8
1: 1
2: 5
3: 3
4: 6
5: 3
6: 4
7: 5
8: 1
1 appears 2
2 appears 0
3 appears 2
4 appears 1
5 appears 2
6 appears 1
Step by Step Solution
3.40 Rating (147 Votes )
There are 3 Steps involved in it
Heres a Python program that uses a function called throwDie to simulate throwing a die python import ... View full answer
Get step-by-step solutions from verified subject matter experts
