<filename>Python/iteration_and_inverse_iteration/python3-3/PrimeNumber.py
class PrimeNumber:
    def __init__(self, start, end):
        self.start = start
        self.end = end

    def isPrimeNum(self, k):
        if k < 2:
            return False

        for i in range(2, k):
            if k % i == 0:
                return False
        return True

    def __iter__(self):
        for k in range(self.start, self.end + 1):
            if self.isPrimeNum(k):
                yield k


for x in PrimeNumber(1, 100):
    print(x)