Write a script to simulate the rolling of two dice

Assignment Help Other Subject
Reference no: EM13220333

Write a script to simulate the rolling of two dice. The script should use Math.random to roll the first die and again to roll the second die. The sum of the two values should then be calculated. [note: Since each die can show an integer value from 1 to 6, the sum of the values will vary from 2 to 12, with 7 being the most frequent sum, and 2 and 12 the least frequent sums. Your program should roll the dice 36,000 times. Use a one-dimensional array to tally the numbers of times each possible sum appears. Display the results in an XHTML table. Also determine whether the totals are reasonable.(e.g., there are six ways to roll a 7, so approximately 1/6 of all the rolls should be 7)]

Reference no: EM13220333

Questions Cloud

Expain how mccaryism affected the lived : Expain how mccaryism affected the lived and political thinking of people in the u.s. Defend mccaryism as appropriate or criticize it as inappropriate for the time in which it occured.
Favorite films-fictitious or biographical : Think about a character from one of your favorite films, fictitious or biographical.
Demographic and socioeconomic standpoint : What does the typical public school child look like from a demographic and socioeconomic standpoint? What is the typical budget expended on pk-12 public schooling in the united states? Break this down by individual states.
List some products both hazardous and non hazardous : list some products both hazardous and non hazardous that you would deal with in a nursing home and how you would protect yourself and others from harm/contamination when using them
Write a script to simulate the rolling of two dice : Write a script to simulate the rolling of two dice. The script should use Math.random to roll the first die and again to roll the second die. The sum of the two values should then be calculated
Explain the notion of a collective conscience : Explain the notion of a collective conscience, offered by David Emile Durkheim and briefly compare the similarities and differences of class consciousness and collective conscience,
Effect of employee hiring policies on private security : effect of employee hiring policies on private security.
Stamp act- quartering act : At the same time that Parliament imposed the Stamp Act, it also passed the Quartering Act, which required...
Economic conditions for casual day laborers : Around 1820-1840, the economic conditions for casual day laborers in American cities...

Reviews

Write a Review

Other Subject Questions & Answers

  Different parenting styles

Briefly describe these five different parenting styles, 1) Permissive 2) Permissive-indulgent 3) Permissive rejecting- neglecting

  Information and communication technology

Information and communication technology allows us to collect information faster.  Do you believe that this will foster faster decision making by managers?

  Meddle in the affairs of other nations

Has America been far too willing to meddle in the affairs of other nations since the late 1800s?

  The economy begins in the long-run equilibrium

The economy begins in the long-run equilibrium. Then one day, the president appoints a new chairman of the Federal Reserve. This new chairman is well known for his view that inflation is not a major problem for an economy.

  Personality theory presentation

As an expert in the field of personality theory, you have been asked to present at a large Psychology conference. The focus of your presentation is behaviorism and social-learning theory.

  Gender-race and ethnicity have affected your behavior

How do you think gender, race, and ethnicity have affected your behavior?

  Explain seaboyer enacted bylaw to curb prostitution

Create the two-three page response which addresses all aspects of the problem. Case: In response to public pressure, newly elected town councillors of city of Seaboyer enacted a by law to curb prostitution associated activity on city streets.

  Important of study public administration

Discuss the rationale behind creating new, separate disciplines of public administration and public policy. Do you believe that all public administrators should matriculate in a Masters in Public Administration program?

  Norms of conduct in health

Licensing boards have the authority to suspend or revoke the license of the health care professional who is found to have violated specified norms of conduct. What are these norms? Discuss

  Concerning ring satellites of the planets

Which of the following statements concerning ring satellites of the planets is true?

  Describe how to determine priority and message

Perform the two-page content analysis on this report to find out its major priority and message. In response, describe how you determined priority and message and upload to yur Student Folder.

  Annotative bibliography

Im having a lot of trouble with writing an annotative bibliography. I just dont understand how to form it. how do i get started? should i do all of my research for the topic first?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd