I'm having an error with conditionals


#1

can someone pls tell me why am i getting an error with this code?


def the_flying_circus():

 	if 5>4 and 4 > 3:   
 	 return True 
  elif 3 == 3:
   return False
  else:
   return False

#2

In order to help you, we’re going to need a few things:

  • A link to the lesson
  • Any and all error messages you have received

If you do these things, we will be better able to help you.


#3

As it is right now though, you’re indentation is off…

      if 5>4 and 4 > 3:
        return True
    elif 3 == 3:
      return False
    else:
      return False

The if statement should be on the same indentation level as the elif and else statements.

If indented properly, it should look something like this:

def the_flying_circus():
    if 5 > 4 and 4 > 3:
        return True 
    elif 3 == 3:
        return False
    else:
        return False

#4

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