added total workers amount to the table

This commit is contained in:
2025-01-31 17:47:26 -05:00
parent 3cd037c8b3
commit a1ab31acfe
3 changed files with 46 additions and 71 deletions

View File

@@ -1,16 +1,9 @@
class HelloWorld:
def __init__(self, num_iters):
self.num_iters = num_iters
self.counter = 0
class SampleClass:
class_attr = 100
def __init__(self, instance_attr):
self.instance_attr = instance_attr
def __iter__(self):
qreturn self
qreturn self
def __next__(self):
if self.counter < self.num_iters:
self.counter += 1
return "Hello World"
raise StopIteration
def method(self):
print(f"Class attribute: {self.class_attr}")
print(f"Instance attribute: {self.instance_attr}")