Sunday, 31 May 2015

Python-Conditionals-and-Control-Flow 15/15

If...elif...else

Code:
def the_flying_circus():
    if 12 and 1 + 1 == 2:    # Start coding here!
        print "Yes, I'm greater than 11!"
        # Don't forget to indent
        # the code inside this block!
        return True
    elif 11 < 12:
        print "We are a circus of less than 12 men!"
        # Keep going here.
        return True
    else:
        print "We don't know how many people we are!"
        # You'll want to add the else statement, too!

No comments:

Post a Comment