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

Which adverb best completes the sentence? Eduardo está ahorrando dinero _____________ para viajar por Ecuador. fuertemente especialmente lógicamente car
In a ground state hydrogen atom in which orbital is the electron
What is the capacity of the football stadium at the university of michigan?
A rancher needs to enclose two adjacent rectangular​ corrals, one for cattle and one for sheep. if the river forms one side of the corrals and 180 yd of fencing
by Emily Dickinson A prompt—executive Bird is the Jay— Bold as a Bailiff's1 Hymn— Brittle and Brief in quality— Warrant2 in every line— Sitting a Bough3 like a
In the federalist papers, James Madison, Alexander Hamilton and John jay supported? A. Absolute control of state government B. Division of power into three br
What is 871 rounded to the nearest ten
Go Blue Retail Store collected $12,000 of its accounts receivable. The expanded accounting equation changes include which of the following? A. Cash and capit
Rick says to find 2 x 5 he can use counting by 5s: 5, 10, 15, 20, 25. Explain what he did wrong.
Simplify.     -(2/3)(-9y)(3/2)(8x)(1) A. 72xy   B. –72xy   C. 72   D. 0