Question: in javascript: Array / Function: Rolling Die Simulation See the sample code with comments. Copy the sample code to your solution. Complete the requirements in
in javascript: ArrayFunction: Rolling Die Simulation
See the sample code with comments.
Copy the sample code to your solution. Complete the requirements in the code template.
Overview
Simulate or rolls number of rolls chosen randomly of a die and display statistics.
High Leve Tasks
Your code will perform the following tasks:
Populate an array simulating or rolls
Create a function that returns the number of times a roll occurred
Input: A digit between
Return: A single number. Count the number of times that the digit was rolled
Display output
A simple header
Result statistics see output and requirements below
Output
Your numbers will vary as the results are random
Output Format Requirements
A header with your last name and number of rolls in the simulation
Details for each outcome Actual and expected occurrences and relative frequencies
Round relative frequency to digits after the decimal
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
