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: Array/Function: 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 1200,2400, or 3600 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 1200,2400, or 3600 rolls
Create a function that returns the number of times a roll occurred
Input: A digit between 16
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 3 digits after the decimal

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!