subject

The algorithm below is used to simulate the results of flipping a coin 4 times. Consider the goal of determining whether the simulation resulted in an equal number of heads and tails.
Step 1: Initialize the variables heads_counter and flip_counter to 0.
Step 2: A variable coin_flip is randomly assigned a value of either 0 or 1. If coin_flip has the value 0, the coin flip result is heads, so heads_counter is incremented by 1.
Step 3: Increment the value of flip_counter by 1.
Step 4: Repeat steps 2 and 3 until flip_counter equals 4.
Following the execution of the algorithm, which of the following expressions indicates that the simulation resulted in an equal number of heads and tails?
A. coin_flip = 1
B. flip_counter = 1
C. flip_counter = 2
D. heads_counter = 2

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 06:40
What are the three uses of a screw?
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
You have been supporting csm tech publishing's windows server 2016 server network for over a year. the office has two windows server 2016 servers running active directory and a number of other roles. management has informed you that a small sales office is opening in the same building three floors up. the sales manager wants to install a sales application on a server located in the sales office. this server will have limited physical security because there's no special room dedicated for it, which means it will be accessible to non-it personnel and visitors. you're considering installing windows server 2016 server core on the new server because accessing its console regularly probably won't be necessary, and this server will be managed from one of the other csm tech publishing servers. what are the benefits and drawbacks of using server core for this branch office? what are some things you should do to set up this server management environment?
Answers: 1
question
Computers and Technology, 23.06.2019 21:10
Asample of 200 rom computer chips was selected on each of 30 consecutive days, and the number of nonconforming chips on each day was as follows: 8, 19, 27, 17, 38, 18, 4, 27, 9, 22, 30, 17, 14, 23, 15, 14, 12, 20, 13, 18, 14, 20, 9, 27, 30, 13, 10, 19, 12, 26. construct a p chart and examine it for any out-of-control points. (round your answers to four decimal places.)
Answers: 2
question
Computers and Technology, 24.06.2019 00:20
The guy wire bd exerts on the telephone pole ac a force p directed along bd. knowing the p must have a 720-n component perpendicular to the pole ac, determine the magnitude of force p and its component along line ac.
Answers: 2
You know the right answer?
The algorithm below is used to simulate the results of flipping a coin 4 times. Consider the goal of...
Questions
question
Mathematics, 23.05.2020 21:01
Questions on the website: 13722367