To solve this problem, let's break it down step by step.
Step 1: Let's start by figuring out how many heads of lettuce were sold in the afternoon. The problem states that 2/7 of the remaining heads were sold. This means that the number of heads sold is (2/7) * (remaining heads).
Step 2: Now, let's determine the remaining heads of lettuce after the afternoon sale. We know that the remaining heads are 1/2 of the number at the beginning of the day. So, if x is the number of heads at the beginning of the day, the remaining heads are (1/2) * x.
Step 3: Combining the information from steps 1 and 2, we can write the equation: x - [(2/7) * (1/2) * x] = 24.
Step 4: Simplifying the equation, we get x - (1/7) * x = 24.
Step 5: Continuing to simplify, we have (7/7) * x - (1/7) * x = 24.
Step 6: Further simplifying, we get (6/7) * x = 24.
Step 7: Multiplying both sides of the equation by 7/6 to isolate x, we have x = (24 * 7/6).
Step 8: Calculating x, we find that x = 28.
Therefore, there were 28 heads of lettuce at the beginning of the day.