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 is 2w · w? A) 2w B) 2w² Explain.
When meeting a candidate to become your lawyer for the first time, it is important to _____.
True or false The South opposed tariffs because it feared the tariffs would hurt its industry and factory workers.
June made 18 liters of fruit punch for a birthday party.One thrid of the punch was orange juice, 4 liters of the punch was pineapple juice,and the rest was club
The chemical symbol for sulfuric acid is H2SO4. How many atoms are contained in each molecule of sulfuric acid?
An atom of the element chromium has an atomic number of 24 and a mass number of 52. How many electrons are in an uncharged atom of chromium?
When DNA is copied, sometimes a new, incorrect, base pairing appears within the structure of a new DNA molecule replacing original base pairs. This mistake is c
Is carbon dioxide a polar or non-polar molecule?
what type of reproduction creates seeds?
from the perspective of the employee, why is it so important to have employees who can critically think?