vendredi 25 septembre 2020

Why does it keep saying syntax error on my else statement? [closed]

my code is it keeps on coming up with a syntax error in Play_Again its highlighted with a #

def Number_Randomizer():

    import random
     
    hidden = random.randrange(1, 101)
    print(hidden) #For testing

def User_Guess():
     
    guess = int(input("Please enter your guess: "))
     
    if guess == hidden:
        print("WINNER!")
    elif guess < hidden:
        print("Your guess is too low")
    else:
        print("Your guess is too high")

def Play_Again():
    
    PA = input("Do you want to play again? (y/n) : ").lower()
    if PA == "y" or "Y":
        main()
        
        else: #it keeps saying syntax error on this else it highlights the e
            print("Thank you for playing!")
            exit()

Aucun commentaire:

Enregistrer un commentaire