The Big If Question


Oops, try again. The following exception was raised when calling the_flying_circus(): NameError: global name 'condition' is not defined

I am having problems with syntax, I am sure the rest is not that bad, thanks for any help.

Replace this line with your code. 
# Make sure that the_flying_circus() returns True
def the_flying_circus():
    if condition (2*2 == 4) and "Doggy" == "Cat":
        return False
    elif condition (4*3 == 12) and (24 % 2):
        return True
    else :
        return True


You just need to remove the word condition and leave the rest as it is.


thanks so much, good stuff this site is great. thanks again funct10n.


im not quite sue what i happening to mine? it says "Indentation Error: expected an indented block"


Does your code resemble the code in the opening post? Notice how the indentation occurs in the pseudo code below:

def function
    if statement:
        conditional branch action
    elif statement:
        conditional branch action
    else statement:
        default branch action

Consider the if..elif..else as one statement. They must all have identical indentation.


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