The big if ........need help badly.... i don''t understand anything here


#1

Make sure that the_flying_circus() returns True

def the_flying_circus():
if ________: # Start coding here!
# Don't forget to indent
# the code inside this block!
elif ________:
# Keep going here.
# You'll want to add the else statement, too!


#2

Write an if statement in the_flying_circus(). It must include:

if, elif, and else statements;

if 12/3 == 4:
        return True
elif "bla bla" != "bla bla":
        return False
else:
        return True

At least one of and, or, or not;

if True == True **and** 6/3 != 3:
or
elif 2/35 == 4 or "shoe" == "foot":
or
elif not True == False:

A comparator (==, !=, <, <=, >, or >=);

if 1 == 1:
elif 2 != 4:
elif 5 < 6:
elif 5 <= 25/5:
elif 9/81 > 0.1:
elif 79 >= 8*45:

If you do as I have shown you for each instruction, you should do fine.

Finally, the_flying_circus() must return True when evaluated.

For example:

def the_flying_circus():
    if 1==1:
        return True

One statement should be true, so it can return True!

I hope it helps you :smiley:


#3

@frozentofu, @microblaster20003,
== the Book ==
https://docs.python.org/2/tutorial/controlflow.html
http://legacy.python.org/dev/peps/pep-0008/


#4

That would be what I was trying to explain in a nutshell ^^


#5

i tried this,it didnt work


#6

Copy your code here please so we can actually see why it won't work.


#7

you help me.thanks!

def the_flying_circus():
if 1==1:
return True #must have one return True
elif ____: #can more elif,at last one elif condition
return _____
elif ____: #can more elif condition
return _____
else: #add else condition to the end
return _____

It is work!