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

  An ideal carnot heat engine has an efficiency of 40 if the

an ideal carnot heat engine has an efficiency of 40. if the high temperature is raised 15 what is the new efficiency

  Find the free-fall velocity of an 85-in-diameter sphere

find the free-fall velocity of an 8.5-in-diameter sphere bowling ball weighing 16 lb falling through the following

  Scenarioprepare a power point presentation and a short

scenarioprepare a power point presentation and a short report relating to the capabilities of solidworks motion

  Find out the exit temperature

Determining the Exit Temperature and Power Input of Air through a Compressor, Air at 150Pa and 310K enters a compressor of inlet diameter 2cm. The Compressor raises the pressure to 3.5 times the inlet pressure

  Determine the maximum velocity

determine the maximum velocity to which water can be accelerated by the nozzles before striking the turbine blades.

  If the mass flow rate of the cold stream is twice that of

a stream of refrigerant-134a at 1 mpa and 12 c is mixed with another stream at 1 mpa and 60 c. if the mass flow rate of

  Find the reheat temperature so the turbine output is

a smaller power plant produces steam at 3 mpa 600 c in the boiler. it keeps the condenser at 45 c by transfer of 10 mw

  What is the mass of the lead weight

What is the mass of the lead weight, if 100 J of heat is lost from the water after the weight falls a distance of 3 m.

  Initially the air in this tank is at 20 psia and 70 degrees

a scuba divers 2 cubic foot air tank is to be filled with air from a compressed air line at 120 psia and 100 degrees f.

  Ithe pdf for the drift in volts is fx 341-x2 lxl lt 1

the allowable drift on a voltage regulator has a specification of 0.0 - 0.8 volts. each time a regulator does not

  Draw a schematic of the ideal rankine cycle and the

an engineer has proposed that a simple ideal rankine cycle that uses refrigerant-134a be used to produce work with heat

  Apparent density and theoretical density and void volume

Apparent Density, Theoretical Density and Void Volume, A compacted body of iron powder is sintered into a 20mm-diameter, 45-mm-tall cylinder which, upon weighing

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