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 four times a age decreased by 3 is equal to 3 times the age increased by 7. what is the age
Significant settlement in Manitoba Saskatchewan and Alberta
what is -5 1/10 equal to
As a salesperson, you are paid $50 per week plus $3 per sale. This week you want your pay to be at least $110. What is the minimum number of sales you must make
BD bisects angle ABC, measure of angle ABC=5x-4, and measure of angle CBD=2x+10. Angle ABC is a(n) _ angle
What is the 7th term in the sequence below? 3,12,48,192,...
Olivia ordered 24 cupcakes and a layer cake. The layer cake cost $16, and the cost of the order was $52. What was the price of each cupcake?
Why is the equation y=5x a special case of the slope-intercept form?
what is the least common denominater for 5/6 and 3/8
S=2(lw lh wh) solve for w