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

Manuel traveled 3 hours nonstop to​ mexico, a total of 106 miles. he took a train part of the​ way, which averaged 40​mph, and then took a bus the remaining​ di
which of the following best Compares an explanation and an argument? A. an explanation is informative, while an argument is persuasiveB. an explanation presents
What term is used to describe the hot ash, gases, and materials being erupted at speeds of up to 400 mph?
digital cameras have what settings that are equivalent to film speeds
How does the value of a Panamánian balboa compare to that of a U.S. dollar, and why is this so? Write your answer in English.
On the grid draw the line with equation y=3
Which part of earth receives the greatest total amount of solar radiation when earth is in this position? northern hemisphere south pole southern hemisphere equ
Answer ASAP! France's estates included which groups or classes of people? (NOTE: Answering "everyone else" will be graded wrong.) Must be 3 answers.
please help thank you very much and show all work
How to calculate volume