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 of 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 execution of the algorithm, which of the following expressions indicates that the simulation resulted in an equal number of heads and tails?