import sys
def menu():
print("Welcome to Celebrity Dogs")
print("Write A to Start Game or B to Quit.")
answer = input()
if answer == ("A"):
print("Let's play!")
elif answer == ("B"):
print("Bye then!")
sys.exit()
else:
print("invalid answer, select A or B")
menu()
def numberofcards():
number=int(input("Enter an even number that is less than 30 and more than 4."))
if number < 30 and number > 4 and number % 2 == 0:
print("Ok, Here are the cards.")
else:
print("Invalid")
numberofcards()
Hi. My code works perfectly fine, but when I input B to quit, it still asks me to Enter an even number that is less than 30 and more than 4. why? Thanks in advance x p.s. the def ... and the print is part of the code xx