IDNLearn.com: Your one-stop destination for finding reliable answers. Ask any question and receive timely, accurate responses from our dedicated community of experts.
def is_even_number(n):
return True if n % 2 == 0 else False
while True:
number = int(input("Enter a number: "))
if number == 0:
break
else:
if is_even_number(number):
print("Even")
else:
print("Odd")
I wrote my code in python 3.8. I hope this helps.