Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

I'm having a hard time with the level logical path in the forest

this is my code:
`

Get two secret true/false values from the wizard.

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.

Check the guide for notes on how to write logical expressions.

secretC = secretA and secretB
if secretC:
hero.moveXY(20, 33)
else:
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)

If secretB is NOT true, take the high path.

if secretB !== “true”:
hero.moveXY(44,33)
`

# Get two secret true/false values from the wizard.
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.
# Check the guide for notes on how to write logical expressions.
secretC = secretA and secretB
if secretC:
    hero.moveXY(20, 33)
else:
    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)
        

# If secretB is NOT true, take the high path.
if secretB !== "true":
    hero.moveXY(44,33)

I see you accidently put one more equal sign at the bottom of your code.