To solve this problem, we need to keep track of the number of oranges remaining after each customer's purchase.
Let's go through each option and see which one satisfies the given conditions:
A. 17: This option is incorrect. If the vendor had 17 oranges in the beginning, the first customer would have purchased 17/2 + 1/2 = 9 oranges. Then the second customer would have purchased (17-9)/2 + 1/2 = 5 oranges. Finally, the third customer would have purchased (17-9-5)/2 + 1/2 = 2 oranges. This means there would be 1 orange left in the vendor's basket, not an empty basket as mentioned in the problem.
B. 23: This option is incorrect for the same reason as option A. If the vendor had 23 oranges in the beginning, there would be 1 orange remaining after all the customers made their purchases.
C. 9: This option is incorrect. If the vendor had 9 oranges in the beginning, the first customer would have purchased 9/2 + 1/2 = 5 oranges. Then the second customer would have purchased (9-5)/2 + 1/2 = 3 oranges. Finally, the third customer would have purchased (9-5-3)/2 + 1/2 = 1 orange. This would leave 0.5 orange in the vendor's basket, not an empty basket as mentioned in the problem.
D. 7: This option is correct. If the vendor had 7 oranges in the beginning, the first customer would have purchased 7/2 + 1/2 = 4 oranges. Then the second customer would have purchased (7-4)/2 + 1/2 = 2 oranges. Finally, the third customer would have purchased (7-4-2)/2 + 1/2 = 1 orange. This would leave 0 oranges in the vendor's basket, satisfying the condition of an empty basket.
Therefore, the correct answer is D. 7.