[SOLVED]Logical Path Level help

Hi, I just got to this level and filled out the code but towards the end, I get killed and I can’t seem to find what went wrong. Can someone please help? Here is my code:

# Get two secret true/false values from the wizard.
# Check the guide for notes on how to write logical expressions.
hero.moveXY(14, 24)
secretA = hero.findNearestFriend().getSecretA()
secretB = hero.findNearestFriend().getSecretB()

# If BOTH secretA and secretB are true, take the high path; otherwise, take the low path.
secretC = secretA and secretB
if secretC:
    hero.moveXY(20, 33)
    hero.moveXY(20, 15)
hero.moveXY(26, 24)

# If EITHER secretA or secretB is true, take the high path.
if secretA != "true" or secretB != "true":
    hero.moveXY(32, 33)
    hero.moveXY(32, 15)
hero.moveXY(38, 24)
# If secretB is NOT true, take the high path.
if secretB != "true":
    hero.moveXY(44, 15)
hero.moveXY(50, 24)

What’s your equipment? (send a screenshot)
Because as far as I can tell, your code seems fine, so if you keep getting killed, it might be because you don’t have enough health. :slight_smile:


Hold on I figured it out I just changed the code on the last few lines and reverted the coordinates

1 Like

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