The Big If


#1

what do I do? where's the console window?


#2

Hello :smile:,

To answer your first question, What do I do?

  • Write an if statement in the_flying_circus(). It must include:
  • if, elif, and else statements;
  • At least one of and, or, or not;
  • A comparator (==, !=, <, <=, >, or >=);
  • Finally, the_flying_circus() must return True when evaluated.

The Error Message you received:
IndentationError: expected an indented block

Steps to solve your problem:

1.) After your if and elif statement you should return a value
2.) And add an else statement at the end of your existing code

def the_flying_circus():
    if 3 < 4:    
      return True;
    elif (10 == 10) and (5 >= 5):
     return True;
    else:
        return "?"

The reason why I made the if and elif statement both return True is because that's what your above code would result in

e.g. 3 < 4
-------> True

e.g. (10 == 10) and (5 >=5)
-------> True

I recommend making a condition that would display True and a second one that displays False and ofcourse your else statement can be any string or number you want.


#3

Be sure to include one statement that displays "True" when your function is evaluated and your other statement should have a condition which would not make "False" appear, (because you obviously don't want it to result in false)

To answer your second question Where's the console window?

Its the area on your screen that displays the output of your code and Error messages like the one in your screen shot