estradaangelic80
estradaangelic80 estradaangelic80
  • 12-11-2020
  • Computers and Technology
contestada

How many times is the coin tossed?

var heads = 0;
var tails = 0;
var rolls = 100;
for(var i = 0; i < rolls; i++){
if(randomNumber(0,1) == 0){
heads++
} else {
tails++
}
}

Respuesta :

ksuakh89 ksuakh89
  • 12-11-2020

Answer:

100 times.

Explanation:

The code will loop until i is equal to or greater than roles. I starts at zero and increases by one after each toss.

Answer Link
unicorn11908
unicorn11908 unicorn11908
  • 12-11-2020
The answer is what the other guy said
Answer Link

Otras preguntas

whats the united states current presidents name?
a bag of books took 3 minutes to move you did 12900 j if work how much power was required to move the bad
Factor 30y 2 z 12yz 2 - 18yz.
how do I work out this question? A train travels from London to Manchester it leaves at 16 55 and it arrives at 19 45. Work out the number of minutes the train
What caused arachne's failures
what is empirical and moleculer formula?.
How much heat energy is produced by 0.5 Wh of electrical energy? A. 2.6 Btu B. 0.15 Btu C. 1.7 Btu D. 0.4 Btu
if joelle multiplied 792 by a positive integer and came up with a perfect square, what is the smallest integer she could have multiplied by?
The graph of the function f(x) = –(x + 3)(x – 1) Which statement about the function is true 1.The function is positive for all real values of x where x < –1
if weight is the force of gravity on an object, then your weight can change if the force of gravity is different on a different planet?