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

Answers

Answer 1

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.

Answer 2

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


Related Questions

PODARDSRTH?HOW SPELLING

Answers

sorry, I d0nt understand
Other Questions
A bike wheel has a radius of 12 inches. How far will someone travel in 500 rotations? About how far is this in feet? Round to the nearest foot. 1) d=rtd = distance traveled by a moving objectr = rate of speedtime the object travelst = time the object travelsYour first stop is in Bend, which is 122 miles away. Howfast do you need to travel in order to make it there in 3hours? The original perimeter of a rectangle is 30cm, if we enlarge it by a scale factor of 4what is the new perimeter?1201920480 PLEASE HELP!!! I WILL GIVE BRAINLIEST A detail that is not needed is called ____ information. what subatomic particle determines whether an atom is radioactive? Is technology ruining us ? 3. Is this data linear or nonlinear? Explain how you know.* You put $500 in a savings account. The account earns $20 simple interest in 6 months. What is the annual interest rate? Write your answer as a percent 10Sara was thinking of a number. Sara adds 19 to it, then doubles it and gets an answer of 39.2. What was the original number? Which expression is equivalent to 46 - 2x)?A) 24-8xB) 24-6xC) 10-8xD) 10-6x If a = 12 in and b = 25 in, what is the area of the pencil? A. 372 in2 B. 169 in2 C. 322 in2 D. 444 in2 Which type of economic system does the United States have? A. Market B. Command C. Mixed D. Traditional geometry I need help Discuss any five items of government expenditure in Nigeria WILL GIVE BRAINLYEST 50 POINTS!In four to five sentences, compare and contrast environmental and genetic factors that affect a plant's growth. Find the value of f(-8). Can anyone help me choose the correct answer?! Oberon is a moon of Uranus. It has a mass of 3.01 x 1021 kg and is 761.4 km away from Uranus. If the force of gravityof Uranus is pulling 3.00 x 1025 N on Oberon, what is the mass of Uranus? (6 points) DNA and RNA are made of what monomers? ___________________________42. What are the 3 components of a nucleotide? ________________________________________43. What are the elements found in nucleic acids?___________________________________44. What are the 3 polymers for nucleic acids.________________________________________45. What are the 2 main functions for nucleic acids.________________________________________________________________________