# Check multiple conditions before allowing a spell
spell = "Patronus"
level = 5
advanced_spells = ["Patronus", "Expecto Patronum"]

if spell in advanced_spells and level >= 5:
    print("You may attempt the charm.")
elif spell in advanced_spells:
    print("Come back when you are year 5 or higher.")
else:
    print("That spell is not on the restricted list.")
