How many tails and heads you get

Assignment Help Basic Computer Science
Reference no: EM13306200

1 Simulate rolling a pair of dice 10,000 times, and record the number of 2's, 3's etc. using an array. The array size would be 0 to 12, but you would not use indexes 0 or 1 because your numbers would be 2 to 12. Print out the number of 2's, 3's, etc. May sure your program gives random values each time the program is run. Print out 2 runs of the program. Your for loops would go from 2 to 12.

2 Simulate tossing a coin 10,000 times and record how many tails and heads you get. Make two runs as with the dice. Again accumulate the number of heads and tails in an array. Your for loops would go from 0 to 1.

 

Reference no: EM13306200

Questions Cloud

Enhancing organizational efficiency and effectiveness : One page response APA style please.Enhancing organizational efficiency and effectiveness in large organizations can be accomplished by wisely grouping activities in such way as to avoid overlapping, reducing redundancy and to enhance cooperation, com..
Write a program that calculates a savings accounts yearly : Write a program that calculates a savings accounts yearly savings amount. The savings account pays an interest rate of 3% yearly.
Calculate how many minutes it takes for the runner to run : A sprinter runs using a force of 200 N and a power output of 600 W. Calculate how many minutes it takes for the runner to run 1 km.
Determine what is the design volume of the aeration basin : Assume the microorganisms are 55 percent efficient at converting food to biomass, the organisms have a first-order death rate constant of 0.05/day, and the microbes reach half of their maximum growth rate when the BOD5 concentration is 10 mg/L
How many tails and heads you get : Simulate tossing a coin 10,000 times and record how many tails and heads you get. Make two runs as with the dice. Again accumulate the number of heads and tails in an array. Your for loops would go from 0 to 1.
Calculate mass of sludge wasted each day for sludge system : A wastewater treatment plant has a flow of 35,000 m3/day. Calculate the mass of sludge wasted each day (QwXw, expressed in kg/day) for an activated-sludge system operated at a solids retention time (SRT) of 5 days
What is the final temperature of the iron block : A 3.5-kg block of iron (c=0.11 kcal/kgoC) that has been brought to a temperature of 1,063oC is placed on top of a 2.5-kg block of ice (c=0.5 kcal/kgoC) that has been cooled to -50oC
Discuss the typical risks faced by a firm : In a market economy, the price system facilitates allocation of resources. Discuss how a manager may contribute to the profit maximization goal of a firm by studying managerial economics.
Does that imply that a is a regular language : If A

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Government regulation in bio-engineered products

When it comes to the food industry and the bio-engineered products, is there such a thing as too much government regulation?

  Calculates how many km had went a man

Write a program that calculates how many km had went a man and how far he was from the initial point .

  How procedure calls go before registers saved in memory

How deep can the procedure calls go before registers must be saved in memory? (That is, what is the maximum number of "active'' procedure calls that can be made before we need to save any registers in memory?)

  Write program reads in the length and width of a rectangular

Write a program that reads in the length and width of a rectangular yard (in meters) and the length and width of a rectangular house (in meters) placed in the yard. Your program should compute the time (in minutes) required to cut the lawn around ..

  Physical characteristics and moisture content

Explain how the different physical characteristics and moisture content of soil lead to the different angles of repose, swell, and shrinkage factors. Explain how these factors affect excavation operations and costs.

  A deck of playing cards in a card game

A deck of playing cards in a card game where cards may be drawn from, or discarded to, either the top or the bottom of the deck, but no access to cards in the middle of the deck is permitted.

  Which library procedures issue system calls

With respect to a programmer, a system call looks the same as a call to a library procedure. Is a programmer required to identify which library procedures issue system calls? Explain your answer.

  Explain the role of such calculations in clipping algorithms

Given a line segment with endpoints (2. 5) and (9, 15), provide the equation for that line segment using a parameterized representation.

  Create incident response policy covers development-response

Policy to reduce network down-time if future incidents happen. Create incident response policy which covers development of incident response team, disaster recovery process and business continuity planning.

  Find a recurrence relation for the number

Find a recurrence relation for the number of bit strings that contain the string 01 . what are the initial condition , and how many bit strings of length seven contain the string 01. please explain it fully step by step to better undestand

  Internet access providers

Should Internet access providers or telephone companies be allowed to monitor how you use your Internet or telephone connection? Why or why not?

  Mips uses word alignment

MIPS uses word alignment, so all words are stored in memory on word boundaries; this means that address bits A[1:0] are always 00. How many and which address bits would be allocated for the set index?

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