subject
Computers and Technology, 11.02.2021 01:00 shyah90

A 2-sided coin has an equal likelihood of landing on each side. One side is called "heads" and the other is called "tails". The program below simulates randomly flipping that coin many times. var heads = 0;
var tails = 0;
var rolls = 100;
for(var i = 0; i < rolls; i++){
if(randomNumber(0,1) == 0){
heads++
} else {
tails++
}
}
Which of the following is NOT a possible combination of values of the variables in this program when it finishes running?

A. tails has a value of 0 and heads has a value of 100
B. tails has a value of 100 and heads has a value of 0
C. tails has a value of 20 and heads has a value of 20
D. tails has a value of 50 and heads has a value of 50
50 point

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 08:30, Bradgarner772
Based on your knowledge of a good network, describe what you think is a perfect network would be. what kind of information and resources could users share on this network. what would the network administrator do? what kind of communication would be used?
Answers: 1
image
Computers and Technology, 23.06.2019 22:30, ghari112345
Jamie has to enter the names, employee id’s, and income of a group of employees into a worksheet. which option will jamie use to describe the data
Answers: 3
image
Computers and Technology, 23.06.2019 23:30, econsta3
Perform an online search about the booting process of a computer and list all the steps
Answers: 2
image
Computers and Technology, 24.06.2019 08:00, Maxxboogie
Can someone work out the answer as it comes up in one of my computer science exams and i don't understand the cryptovariables
Answers: 1
You know the right answer?
A 2-sided coin has an equal likelihood of landing on each side. One side is called "heads" and the o...

Questions in other subjects:

Konu
Mathematics, 06.06.2020 05:04
Konu
Mathematics, 06.06.2020 05:04