[SOLVED] Help with Logical Path please!

Hi I am sorry for being such a frequent poster but I just cant figure some of these things out, anyways I am having problems with the fact that I finish the code to the best of my ability and it looks perfect… but then BOOM! it just says there is an error with your code I will paste my code as well as a screen shot. thanks for all the help people! :grin: :grinning: :grinning: :grinning:

# 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)
else:
    hero.moveXY(20, 15)
hero.moveXY(26, 24)

# If EITHER secretA or secretB is true, take the high path.
if secretA or secretB == true:
    
    hero.moveXY(38, 24)
# If secretB is NOT true, take the high path.
if secretB == not true:
    hero.moveXY(50, 24)

Help please!!!

Here put False instead.
And you forgot to move according to the truth value of the condition.

Andrei

I will see if it works thanks @AnSeDra

I tried it and it is saying to put quotation marks"" around false, I’ll show you.

Try capitalizing the “f” in false and the “t” in true

for the third one, you have to put

secretC = secretA or secretB

before and then check if secretC meets the conditions above.
For the fourth one, you have to put

secretB = not secretA

before and then check if secretB meets the conditions above.

Hope it helps :wink:

It is not a must, but he forgot to move up and down according to the truth values of the statements.

Andrei

I figured it out, I just had to put secretA somewhere and it was like “now we want to work” and… yea :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: :partying_face: