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 are rotation and revolution and how do they affect Earth?
Mr. Gulliet ate at least 24 skittles as a snack. Which inequality correctly represents this?
Wayne bought 4 boxes of cookies. He got 28 cookies in all. Which equation, when solved, will tell how many cookies were in each box? PLZZZ HELPPP 4C = 28 C - 2
Help, help, help, help. :(
Diameter of a circular track is 90 meters how far would you walk in one lap around the track ?
In what ways do you benefit from engineering?
Elise has pulled 18 marbles from a large bag, and 9 of them are white. Based on experimental probability, how many of the next 16 marbles selected should you ex
Please can you help me with this triganometry question (*^_^*)
Rewrite 3^-4 without negative exponents​
Match the definition with the correct vocabulary word. Acceleration Constant Force Drag Force Isaa Newt The origin or ending point of a moving moving object. O