Trying to make "The Big If" bigger but failed! help please!


I was trying to make The Big If a tiny bit more interactive. But ended up not getting stuff printed.

I have no errors.

As we can see, I am using raw_input() to ask a question "do you like to code?", give an opinion and the code is meant to react to the words yes, unsure or no. It was meant to react by RETURNing false (what the task requests me to do) and then to PRINT a sentence (see my code). The problem is that the boolean True or False was returned, but the sentence didn't get printed. I tried changing PRINT to RETURN but it did not work either.
I think that there is something to do with the syntax of IF STATEMENTS. So can someone tell me how to make the boolean and the sentence appear.

opinion = raw_input("Do you like to code? (yes, no, unsure)")
# Make sure that the_flying_circus() returns True
def the_flying_circus():
    if (8 <= 9) and (opinion == "yes"):    # Start coding here!
        # Don't forget to indent
        # the code inside this block!
        return True  
        print "Lets go!"
    elif (8 == 9) or (opinion == "unsure"):
        # Keep going here.
        # You'll want to add the else statement, too!
        return True
        print "Well you will in future!"
        return False
        print "Don't worry, you might in future!"
print the_flying_circus()


Your code stops running at the return statements, so it doesn't even see the print statements. For the if statement, changing it to or worked for me:


You may also consider adding another option just in case they enter something is not yes, no, or unsure. You could also set the opinion variable to lowercase that way you don't have to worry about the code not knowing the difference between YES and yes.


Please your code did not work for me.


The code discussed here is not a solution to the lesson. It is a bit of code the original poster was testing. If you need assistance with your code, feel free to open up another thread and one of the many helpful people here will be happy to help you out.


Thanks for that.Problem solved.


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