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

  Pipeline diagram for processor which has no forwarding

If the processor has no forwarding, how many cycles will one loop iteration take? show a pipeline diagram to support your answer.

  Statements that make variable-s field-s values consistent

Write one or two statements that make this variable's field's values consistent with the mathematical notion of "origin".

  Give examples of 3 simple (scalar or primitive) data types

Give examples of 3 simple (scalar or primitive) data types commonly provided by programming languages, and identify the method used to represent each data type in the machine

  Cs433: computer architecture

CS433: Computer Architecture - Spring  2014,  Assume a new execution mode called "enhanced mode" provides a 1.5x speedup to the sections of programs where it applies. What percentage of a program (measured by original execution time) must run in en..

  Explain the concept of supply chain management

Explain the concept of supply chain management. Although R/Way offers services rather than products, could that concept apply to the design of R/Way's new system? If so, how?

  Explain traffic control devices to alert drivers

Are all intersections located safely with respect to horizontal and vertical alignment? Where intersections happen at end of high-speed environments (e.g., at approaches to towns); are there traffic control devices to alert drivers?

  The techniques in discovering the requirements

What are some of the techniques in discovering the requirements (fact finding) for a system?

  Identify how to change system settings

Identify at least 3 types of computers, how they process information, and the purpose and function of key hardware components.

  Write a conversion program that prompts the user

Write a conversion program that prompts the user from which unit she/he wants to convert (gallon to liters, miles to Km, celsius to fahrenheit) . You should write three different methods.

  Write an overloaded lineup method

The players in a line-up must be unique. Write an overloaded LineUp method that writes a line-up to an output stream.

  Identify all substrings to create one of five given words

Given a string of letters, identify all substrings that create one of five given words. For example, if the words (arguments) are: structure; such; system; blue.

  Access control system

What access control system is most valuable for protecting enterprise systems? Why? What are two specific strengths and two specific drawbacks for your chosen access control system?

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