def calculateAverage(list):
    """ Calculate the average value from a list """
    size = len(list)
    if size > 0:
        sum = 0
        for i in range(0, size):
            sum += list[i]

        return sum / size
    return 0