13. 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 -
var tails - ;
var rolls - 100;
for(var i=0; i
if(randonlumber(0,1) - )
heads
} else
tails
Which of the following is NOT a possible combination of values of the variables in this program when it finishes running?
O A. tails has a value of O and heads has a value of 100
B. tails has a value of 100 and heads has a value of O
0 C.tails has a value of 20 and heads has a value of 20
O D. tails has a value of 50 and heads has a value of 50

Respuesta :

Answer: tails has a value of 20 and heads has a value of 20

Explanation: Both Values have to add up to 100 for it to work. You cant have a 60% chance of a side that doesn't exist on a coin.

The combination that is not possible is (b)  tails has a value of 20 and heads has a value of 20

The first and the second line of the program initializes heads and tails to 0.

The third line of the program initializes roll to 100

This means that at the end of the program, the combined value of heads and tails variables must add up to 100.

The above highlight is true for options (a), (b) and (d), because

[tex]0 + 100 = 100[/tex]

[tex]100 + 0 = 100[/tex]

[tex]50 + 50 = 100[/tex]

However, this is not true for the third option because

[tex]20 + 20 \ne 100[/tex]

Hence, the combination that is not possible is (c)

Read more about similar programs at:

https://brainly.com/question/18430675