Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

rite a program which uses functions to perform the following tasks. Ask the user how many dice rolls to perform. ( do as a function

rite a program which uses functions 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems A Practical Approach To Design Implementation And Management

Authors: THOMAS CONNOLLY

6th Edition

9353438918, 978-9353438913

More Books

Students also viewed these Databases questions

Question

Develop an effective positioning strategy.

Answered: 1 week ago

Question

What lifestyle traits does your key public have?

Answered: 1 week ago