The Big If Question


#1



https://www.codecademy.com/courses/python-beginner-BxUFN/4/1?curriculum_id=4f89dab3d788890003000096#


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


#2

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


#3

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


#4

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


#5

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.


#6

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