Files
it_test/it_test.py
2025-06-30 15:50:20 +02:00

19 lines
263 B
Python

def iterator():
i = 1
while True:
yield i
i = i * 2
def print_binary(num):
print(f"Bin: {num:032b}")
run = 1
gen = iterator()
while run != 0:
nextv = next(gen)
print(f"Int: {nextv}")
print_binary(nextv)
run = nextv