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

______ creates a secondary market for agricultural loans by buying the loans, pooling them, and selling them as securities.
What is the solution of 2 x²-x+3=x+9 ?
The study of children born in the netherlands during world war ii demonstrated which finding about prenatal malnutrition?
4. Find the product. (4.0 × 10^-2) × (5.2 × 10^8) (1 point) 20.8 x 10^8 2.08 x 10^7 2.08 x 10^6 20.8 x 10^7
Apple's itunes and a traditional music store have very different business ___________ with regards to how they produce and deliver products to customers.
Write an equation with the given solutions. a. 3 and 5
y^2+3y-4 What is the value of the expression below when y=9
I need #10 and #11 please
Compare the electron interactions that occur between atoms forming an ionic bond and atoms forming a covalent bond.
4(20+12) / (5-3) What is this