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

Can someone write me a 1 minute and a half speech about fear? Thank you
Julie scored 42 goals at soccer practice her ratio to goals to misses is 6:5 how many times did she miss
Ifran says that he has 7 marbles more than 5 times the marbles Parmit has. Irfan has 37 marbles. How many marbles does Parmit have?​
Is 5 a solution to the equation 3(x+1)=7(x-2)-3
Explain how President Truman develops the idea of “totalitarianism”
Which kingdom does a multicellular living organism most likely belong to? Archaea Bacteria Eubacteria Fungi
Describe a situation that can be represented by the expression –15 + 8. Hint: Think of situations where you would start off with a negative number and add a po
The stories and beliefs about the past that create a shared culture in acommunity are known as:EeoO A. Connecting past and present.O B. History as common memory
In a right triangle with the length of hypotenuse equal to a and one angle 60º find the length of a leg, opposite to this angle.
Refer to the equation 4x + 3y = 24 (a) Complete the table of values for at least 2 points. Show your work (b) Use the table of values to graph the line. You mus