Untitled
Anonymous
plain_text
01/04/2024 9:59 AM
600 B
19
Indexable
import threading
class f(threading.Thread):
def __init__(self,n):
super().__init__()
self.__n=n
def run(self):
if self.__n%2==0:
print(self.__n," is even")
else:
print(self.__n," is odd")
def main():
x=int(input("Enter the num1:"))
y=int(input("Enter the num2:"))
for i in range(x,y+1):
x=f(i)
x.start()
main() Editor is loading...
Leave a Comment