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

Discuss the systems view of life .
What was a major reason the United States entered World War I (1917)?
order these from greatest to least: 1/8; 0.14; 1/5; 13%
Is black in Spanish for a girl negra?
(-7/10+0.15)÷(-0.125)
Which region was not ruled by the Mongol Empire? Persia Russia Asia Europe
What is the population of Nyc
Discuss the systems view of life .
order these from greatest to least: 1/8; 0.14; 1/5; 13%
i need help with this