def calculate_average(numbers):
total = 0
for num in numbers:
total += num
return total / len(numbers)
numbers = [1, 2, 3, 4]
average = calculate_average(numbers)
print(average)
Question: This code is intended to calculate the average of a list of numbers. However, there's a bug. What's wrong, and how would you fix it?
Options:
A. The `total` variable should be initialized outside the loop.
B. The indentation within the `calculate_average` function is incorrect.
C. The function should return `total` instead of `total / len(numbers)`.
D. The code is working correctly and needs no changes.