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")
print("Odd")
I wrote my code in python 3.8. I hope this helps.
4.5m questions
5.7m answers