Pet Translator- Level help- Python

My code does not work, I don’t know why.

# Your pet should translate commands.
 
def onHear(event):
    # The message the pet heard is in event.message
    message = event.message
    # If the message is "North":
    if message == "North":
        # The pet says "Htron".
        pet.say("Htron")
    # If the message is "South":
    if message == "South":
        # The pet says "Htuos".
        pet.say("Htous")
        pass
    # If the message is "East":
    if message == "East":
        # The pet says "Tsae".
        pet.say("Tsae")
        
# Assign the event handler.
pet.on("hear", onHear)

while True:
    enemy = hero.findNearestEnemy()
    # Don't attack Brawlers.
    if enemy and enemy.type != "brawler":
        hero.attack(enemy)

This is my gear:

Screenshot 2022-12-08 10.34.32 PM

1 Like

Try removing the pass, also, try submitting a couple times, sometimes the seed is a bit buggy

1 Like

Thanks, it worked after I submitted it a few times :smiley:

2 Likes

Please mark the post as the solution so the topic closes :) also, I answered your CS3 problem

1 Like

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.