This commit is contained in:
2026-05-12 18:49:01 +02:00
parent 4fbd30fa19
commit f5edd8ed79
9 changed files with 286 additions and 68 deletions

View File

@@ -0,0 +1,14 @@
class PowerOfTwo:
def __init__(self, exp) -> None:
self.exp = exp
def __call__(self) -> int:
result: int = 2**self.exp
self.exp += 1
return result
if __name__ == "__main__":
power = PowerOfTwo(1)
for _ in range(10):
print(power())