Find the best solutions to your problems with the help of IDNLearn.com. Ask anything and receive well-informed answers from our community of experienced professionals.
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.