The big if


I'm told that line 8, my else statement has invalid syntax. Why is it saying that when it looks correct?

# Make sure that the_flying_circus() returns True
def the_flying_circus():
    if 3!=4:    
        print "The Flying Circus isn%t a myth!" 
    elif 3==4:
       True or False (3<4)
    print "The Flying Circus is a myth!" 
        print "The Flying Circus doesn%t exist."


The problem is actually in the line above:

print "The Flying Circus is a myth!"

this line is not inside the elif, and else needs to be after elif. So i would indent that line correctly.

This solves your current problem, you will get a new error message (the right thing is not returned), if you need help with that as well, make a reply with your updated code + error message. Good luck!


or is it..............:triumph:


Yes, it is. It solves the current error message


I was hoping you would see that. Okay, now the indention in this two lines is not matching:

       True or False (3<4)
        print "The Flying Circus is a myth!"

you should insert an additional space before True, to match the print statement on the line below


No I understood it and I'm now at the part that you said I might need help on. I removed my previous comment but not in time.


Agree, you could ask for more help, i said so. And i kept my promise, now the indent error is gone, do you need more help or can you manage it from here?


I re-posted my code when I got the error you said I'd get and someone else told me that I needed to put "return" and "true" on the same line. I'm past this part now.


Now you lost me, i don't see any returns anywhere. If you need more help, post an updated version of your code + error message.


I re-posted my code after I fixed that line about my else statement. I then added the "return true" to the if, elif, and else statements to my code in my new topic. But the point I'm trying to make is that my code works now. Thanks to you and another guy who responded on my other topic


Well, i didn't you made a whole new topic, with repost your code i just meant a reply in this existing topic. cadecodes is good, good to hear he resolved your issue


Oh... I didn't realize you meant that re-post my code meant to reply to you. Anyways, thank you both for your help.


I can't watch all the topics, but good to hear the issue is resolved :slightly_smiling: