Write a test program that calculates and prints out the

Assignment Help Mechanical Engineering
Reference no: EM13619476

The Birthday Problem The Birthday Problem is stated as follows: if there is a group of n people in a room, what is the probability that two or more of them have the same birthday? It is possible to determine the answer to this question by simulation. Write a function that calculates the probability that two or more of n people will have the same birthday, where n is a calling argument. (Hint: To do this, the function should create an array of size n and generate n birthdays in the range 1 to 365 randomly. It should then check to see if any of the n birthdays are identical. The function should perform this experiment at least 5000 times and calculate the fraction of those times in which two or more people had the same birthday.) Write a test program that calculates and prints out the probability that two or more of n people will have the same birthday for n 2, 3, . . . , 40.

Reference no: EM13619476

Questions Cloud

About how many of the 100 90 confidence intervals would : suppose strep resistance rates in all cities across the country are actually 0.05.a if samples are taken in a
An interference pattern appears on the screen if the angle : a laser beam is incident on two slits with a separation of 0.230 mm and a screen is placed 4.95 m from the slits. an
The firm is considering adding a mid-class spa and expects : cool comfort currently sells 300 class a spas 450 class c spas and 200 deluxe model spas each year. the firm is
An electron experiences a magnetic force with a magnitude : an electron experiences a magnetic force with a magnitude of 4.60times10?15 n when moving at an angle of 60.0 with
Write a test program that calculates and prints out the : the birthday problem the birthday problem is stated as follows if there is a group of n people in a room what is the
Sargentcom plans to sell 2000 purple lawn chairs during may : sargent.com plans to sell 2000 purple lawn chairs during may 1900 in june and 2000 during july. the company keeps 15 of
Find the magnetic field strength at the loop center express : a single-turn wire loop is 3.8cm in diameter and carries a 600ma current.part a find the magnetic field strength at the
The compressor pressure ratio is 117 and the temperature at : a pure jet engine propels an aircraft at 330 ms through air at 60 kpa and 0 degrees celsius. the inlet diameter of this
Because the tank is sitting in the sun the temperature in : in spreading liquid ammonia fertilizer the charges for the amount of ammonia used are based on the time involved plus

Reviews

Write a Review

Mechanical Engineering Questions & Answers

  Package design

Package Design Brief: Assume you are the packaging engineer for a large consumer products company. In this company, the Packaging Design Briefs are initiated by the marketing group and forwarded to the Package Engineering group.

  Mechanical engineering questions

Define dynamic viscosity, Determine the centroid, Pressure due to the height of liquid, Advantage of changing the liquid, Calculate the total moment about the hinge of the seal gate.

  Automatic control

DOF system and Find the differential equation describing the system

  Write a paper on boyle''s law

Write a paper on Boyle's law and describe Compression and Combustion stroke . Also explain Charles's law and illustrate SI engine and CI engine.

  Verify the law for parallelogram of forces

To Verify the law for parallelogram of forces, law for triangle of forces and law of polygon of forces. These laws are very useful to calculate unknown forces in very short time.

  Discharge pressure of the compressor

What is the discharge revised discharge pressure of the compressor.

  The Case for Global Accounting Standards

The role of IFRS in both developing and developed capital markets.

  Wind turbine

Wind turbines are becoming more and more common as a method of energy production, wind turbines by their very nature are dynamic and are subject to and create their own internal and external kinematics and kinetics.

  Advanced design methodologies

8 x product engineering and design review (week 2 – 12), ~3 pages per item which must contain a brief description of the product then delve into concepts such as materials selection, manufacturing methods, life cycle analysis, recyclability and overa..

  Design of absorption column and the cooler

Design of absorption column and the cooler. Process design of other units should be completed along with pipe sizes.

  Determine the maximum total bending moment

Determine maximum total bending moment (static plus dynamic) of the beam under steady-state conditions.

  Force of the water on the gate

Determine the magnitude of the horizontal and vertical components of the force of the water on the gate.

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