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

  Attention deficit hyperactivity disorder

Researchers have discovered that children experiencing Attention Deficit Hyperactivity Disorder (ADHD) show improvements if they attend classes on involving behavioral and social skills

  Theory in an educational setting

Finally, explain two ways in which you might apply principles from this theory in an educational setting.

  Healthcare and children with appropriate references

Integrate other research you have found on healthcare and children with appropriate references?

  Mens-womens patterns of work

What are men's and women's patterns of work? How do such patterns relate to on-the-job achievement and income?

  Impact of negligent hiring on businesses

Develop an anaysis statement of the negligent hiring and due care in hiring rules.

  Greenhouse gases-carbon dioxide-methane-nitrous oxide

THE kYOTO protocol (The United States is not a signatory) has established guidelines for the reduction of these six greenhouse gases: carbon dioxide (CO2) methane (CH4), nitrous oxide (No2), hydrofluocrocarbons (HFCs), perfluocrocarbons (PFCs) and su..

  Genetic testing without the patient consent

Can genetic testing take place without the patient's consent? If so can it take place and results NOT provided to the patient?

  Care continuum alliance-case management

Evaluate the information from these sources for its relevancy in adding to your understanding of case and disease management. What is the purpose or mission of these professional organizations? What standards do these organizations set for certificat..

  Describe scriptural hermeneutics and ricoeur-s thought

Describe what do you mean by Scriptural Hermeneutics, and the importance of Ricoeur's thought. Analyze why these methods came about and are utilized by modern readers.

  Identify musician and band or type of music

Identify and introduce your favorite musician, band, or type of music. (R&B)

  Theory by nurse leaders and nurse managers

Choose a grand or middle-range nursing theory. Describe how application of this theory by nurse leaders and nurse managers can affect outcomes from the given two areas.

  Write the constitution of 1787

Analyze the compromises that were necessary to write the Constitution of 1787, including the Great Compromise (how legislators would be selected

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