Question: rite a program which uses func tions to perform the following tasks. Ask the user how many dice rolls to perform. ( do as a

rite a program which uses func tions to perform the following tasks.
Ask the user how many dice rolls to perform. (do as a function)
Ask the user how many dice will be rolled at one time (1,2 or 3).(do as a function)
Ask the user what the smallest and largest values are on each die. (do as a function)
Create a function to roll a single die. Do this as a function where the smallest and largest are passed in as
parameters and the dice roll is returned.
Use a loop or nested loops in the main program to do the dice rolls and show the results on the screen.
The following illustrates what your screen dialogue might look like:
How many dice rolls should occur? 5
How many dice will be rolled at 1 time? 2
What is the minimum value on a dice side? 1
What is the maximum value on a dice side? 6
Here are the dice rolls:
56
31
42
33
64

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!