Add A Counter To Your Rollhtml Page To Record The

Add a counter to your roll.html page to record the number of rolls that occur before doubles are obtained. Recall that a counter consists of a variable that is initialized to zero and incremented every time some event occurs. In this case, you should declare and initialize the counter variable in the RollUntil function, then add code to increment the counter each time the dice are rolled. When doubles are finally obtained, your page should display the counter’s current value in a page division.
Use your page to conduct 20 different experiments, counting how many times it takes to obtain doubles each time. Are your results consistent with the universal odds of rolling doubles?

Posted in Uncategorized