Edit this Python program to make the output more accurate
def calculate_average(numbers):
    total = 0
    for n in numbers:
        total += n
    return float(total) / len(numbers)
def calculate_average(numbers):
    total = 0
    for n in numbers:
        total += n
    return float(total) / len(numbers) if len(numbers) > 0 else 0