def calculate_sum(xs):
    """Compute sum of an array

    Args:
        xs (list): array that need to compute

    Returns:
        float: sum of xs
    """
    result = 0
    for x in xs:
        result += x
    return result