"""Leetcode 346. Moving Average from Data Stream (Premium)
Easy

Given a stream of integers and a window size,
calculate the moving average of all integers in the sliding window.

For example,
MovingAverage m = new MovingAverage(3);
m.next(1) = 1
m.next(10) = (1 + 10) / 2
m.next(3) = (1 + 10 + 3) / 3
m.next(5) = (10 + 3 + 5) / 3
"""

class MovingAverage(object):
    def next(self, val):
        """
        :type val: int
        :rtype: float
        """
        pass


def main():
    pass


if __name__ == '__main__':
    main()

"""Leetcode 346. Moving Average from Data Stream (Premium)
Easy

Given a stream of integers and a window size,
calculate the moving average of all integers in the sliding window.

For example,
MovingAverage m = new MovingAverage(3);
m.next(1) = 1
m.next(10) = (1 + 10) / 2
m.next(3) = (1 + 10 + 3) / 3
m.next(5) = (10 + 3 + 5) / 3
"""

class MovingAverage(object):
    def __init__(self, size):
        self.size = size
        self.sum = 0

    def next(self, val):
        """
        :type val: int
        :rtype: float
        """
        pass


def main():
    pass


if __name__ == '__main__':
    main()

Revise init lc0346_moving_average_from_data_stream.py