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

What was one of Mexico's greatest challenges in the early twenty-first century? creating a trade alliance with the United Statesstopping drug trafficking along
Do you think the United States should have gotten involved in Vietnam? Why or why not?
What is the value of the expression 115-77 +6 mutipled by 7
HELP!!! 20 POINTS!! TRUE OR FALSE?? The acceleration of objects in free-fall will remain constant in a vacuum regardless of their mass and size.
Suppose you found the following information in a book called Polar Bears by George Williams, published in 2010: Polar bears usually have white fur because they
3×42 using partial products
If an older multimeter is set to display its reading in megohms, what must you do to determine the correct value? Please help.
Cloud roots: Match the Latin word to its meaning, nimbus rain cirrus layers stratus wispy
Add or Subtract to Simplify: (5x + x2 - 4) - (4x - x2 + 6)
6. What phenotypes are possible for pea offspring of this cross?