i want to use function in simple prigram but it`s giving me wrong result in a wrong way
i wanna make a loop with function and ask as many time i want to see if the number i enterd is odd or even
def new_game():
game()
def game():
a = int(input("please enter the number... "))
if a % 2 == 0:
print(a, " Is even ")
else:
print(a, " Is odd ")
game()
def check():
ask = input("Do you want to continue ? yes/no ").lower()
if ask == 'yes':
return True
elif ask == 'no':
exit()
else:
print('Bye')
while check():
game()
check()
break