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

The diameter of a circle is 4 units. What is the radius of the circle? Show work or equations, thanks.
The vast majority of immigrants arriving from Asia passed through which processing center? a. Ellis Island b. Angel Island c. Long Island d. Immigrant Island
If the volume of a sphere is 972(3.14) cubic inches what is the radius- a. 7 icnches b. 9 inches c. 108 inch d. 324 inch
Salvador is 66 inches tall and weighs 200 pounds. Which diet would be best for Salvator to ensure he’s at a healthy weight.
Help me as soon as possible plzzzz
Geographically, Spain is isolated from the rest of Europe by _____. the Pyrenees Mountains narrow coastal plains the Atlantic Ocean Portugal
Please help! I’m terrible at math!!!
It is true that some uninformed people will cast ballots, but it is also likely that mandatory voting will motivate those voters who haven't become involved bef
Explain the effects of each of the following factors on the market price and quantity of cell phones available in the market: an increase in consumers’ income,
What is the quadratic equation of the curve of best fit shown below?