class Average:

    def __init__(self):
        self._sum = 0
        self._n = 0

    def update(self, sum_values, n=1):
        self._sum += sum_values
        self._n += n

    def peek(self):
        return self._sum/max(1, self._n)