Writea program to simulate a lottery drawing that uses balls

Assignment Help Electrical Engineering
Reference no: EM13268502

Writea program to simulate a lottery drawing that uses balls numberedfrom 1 through 10. Assume that three balls are drawn at random (Userandom numbers or allow user to input the number of lotterydrawings to simulate the random number). Your will simulate 10lottery drawings. Store those data to a 3 10 array. The rowsindicate the three balls in a lottery drawing. The columns indicatethe 10 times drawings. In this exercise, You will need tocalculate:
1) Whatpercentage of the time does the result contain three odd numbers inthe simulation? Write a function to finish this task.

2) Printout the original input (10 times drawings) nicely on the screen.Then print out the percentage of time that the result containsthree even numbers.

In this exercise, no global variablesare allowed. NO CREDIT if you did not write the required function to solve the problem.

Reference no: EM13268502

Questions Cloud

What was the delta ray brands net income after-tax : Assuming a federal income tax rate of 34%, what was the Delta Ray Brands net income after-tax?
Current threat of terrorism : Do you believe that the establishment of terrorism as a crime that can be committed domestically has changed community policing?How?Why? Provide examples.
Explain how much energy should be required to break : The bond energy of hydrogen is 51 kJ/mol (0.52 eV/molecule). Based on this information, how much energy should be required to break all of the hydrogen bonds in one gram of ice, thus separating the H2O molecules into independent units. Give answer..
How many moles of gas are present : An ideal gas at 12.4 °C and a pressure of 1.41 x 105 Pa occupies a volume of 2.85 m3.  How many moles of gas are present
Writea program to simulate a lottery drawing that uses balls : Writea program to simulate a lottery drawing that uses balls numbered from 1 through 10. Assume that three balls are drawn at random (Userandom numbers or allow user to input the number of lotterydrawings to simulate the random ..
Compute the wavelength of the photon before the collision : A photon is scattered 60.0° during a collision with an electron, Find the wavelength of the photon before the collision
How hot would a conventional pipe have to get to burst : How hot would a conventional pipe have to get to burst and why. Does it vary according to what material the pipe is made of. Which are the strongest. What are weak ones
Determine the thickness of the oil slick : A transparent oil with index of refraction 1.15 spills on the surface of water (index of refraction 1.33), determine the thickness of the oil slick
Calculate the firms weighted average cost : Calculate the firm's weighted average cost of capital where the firm's borrowing rate on debt is 7.8%, it faces a 35% tax rate, and the common stockholders require a 20.3% rate of return.

Reviews

Write a Review

Electrical Engineering Questions & Answers

  Which method for developing the mine should be used

A second method of development will recover only 50% of the ore deposit , but it will cost only $15 per ton of material removed.Subsequent processing of the removed ore recovers 300 pounds of metal from each ton of processed ore and cost $40 per ..

  Compare the area-delay and power of the adders

Design a 16 bit adder using both the ripple carry and CLA methods. Use 4-bit CLA blocks for the carry-lookahead design. Use only two-input logic gates in your design. Simulate the design using LogiSim at the logic gate level.

  Determine stability by using the state space solution

Convert the following differential equation 5 (t) +4 (t) +3x.(t) + 2x(t) + 7u(t) - 5u.(t) + 2 (t) = 0 to state space form. Is this system marginally stable, asymptotically stable, or unstable when u(t) = 0 Determine stability by using the state sp..

  Determine the armature current and speed

A 300 V, 60 A, 1200 rpm series dc motor has an armature and series field resistance of .2 ohms each. When a .10 ohm resistance is connected in parallel to the winding, the motor's torque is doubled.

  What is the speed of the package when it hits the ground

After a package is ejected from the plane, how long will it take for it to reach sea level from the time it is ejected Assume that the package, like the plane, has an initial velocity of 200 mph in the horizontal direction.

  Calculate the thermal efficiency and compare it with carnot

A Rankine cycle power plant steam enters the turbine at 100psia and 800deg F.. Heat is rejected in the condeser at 80deg F. Isentropic sxpansion and compression occurs in the turbine and pump respectivel

  Which configuration then would have higher input impedance

The input impedance of a JFET used in COMMON SOURCE configuration, is defined by two considerations: The JFET itself has a VERY HIGH INPUT IMPEDANCE, because the input is the GATE to SOURCE junction that is REVERSE biased

  Which of the branches in sequence would be mis-predicted

Assume that we try to predict this sequence with a BHT using one-bit counters. The counters in the BHT are initialized to the N state. Which of the branches in this sequence would be mis-predicted?

  Design a circuit that takes output from each of microphones

Design a circuit that takes the output from each of the five microphones your band uses and adds the voltage to create a single voltage signal which is fed to the amplifer. Except not all voltages should be equaly amplified.

  Describe a system for removing the sharp transitions

In a digital audio system, a digital to analog converter reproduces the analog voltage levels represented by the digital samples. This signal is inherently jagged with sharp transitions between each sample.

  Explain the magnitude of the frequency component

What is the magnitude of the frequency component at 30 kHz? The square wave is passed through an ideal rectangular low pass filter that completely attenuates all frequencies higher than 35 kHz. Write down an equation for the spectrum at the output ..

  Calculate a - b for the pair of numbers

Calculate A - B for the pair of numbers, 1101011, 0101010 assuming a two's complement number system and that the numbers are stored in one byte of memory. The numbers are in un-complemented form.

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