The_flying_circus...again


#1


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


I have some trouble with the exsercise: really don't understand why it is not working... The program wants the block in line 4. : 'IndentationError: expected an indented block'

def the_flying_circus():
    if 3 + 6 == 9 or 5 < 5:    # Start coding here!
    return True # Don't forget to indent
        # the code inside this block!
    elif 3**2 < 5 and 4 - 2 == 2:
    return False   # Keep going here.
        # You'll want to add the else statement, too!
    else: 
    return True
    
    print the_flying_circus


#2

All of the return statements and if statements need to be indented properly,

like,

def example():
    if condition: #if statement indented
        return value #return statement indented
    elif condition: #if statement indented
        return value #return statement indented
    else:
        default condition

#3

Thanks, it helped :slight_smile:


#4

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