I am using a Python compiler to run a script, but it's throwing a syntax error. Here's the code snippet:
[code]
def calculate_sum(numbers):
total = 0
for num in numbers
total += num
return total
numbers = [1, 2, 3, 4, 5]
result = calculate_sum(numbers)
print(f"The sum is: {result}")
[/code]
Upon compilation, the compiler reports a syntax error. I want someone to identify the syntax error and provide the corrected version of the code. Additionally, briefly explain the nature of the syntax error and how you fixed it.
Thank you for tackling this Python compiler error.