I'm can't finish this exercise. Help. Conditionals & Control Flow 15/15


#1

I try a lot of things and a lot of codes. I can't...
Can you help me or give your code in order to help to finish it please.
( I'm sorry if I do language mistakes I'm not English). Thanks for your help.


#2

If you have any code could you put it in here with the proper indentation so i can use that as an example


#3

def the_flying_circus():

if (4 < 6): 
    print "Pony"

elif (5 > 4):
    print "Unicorn"

 else (9== 3*3)
     print "little pony"

I must "return" the_flying_circus
And I don't know how to do that.
I'm a beginner.


#4

def the_flying_circus():

if (4 < 6): 
 return True

elif (5 > 4):
 print "Unicorn"

else:
 print "little pony"

#5

Here's mine. It passed. I just added statements that turned out true for the if and elif parts.

def the_flying_circus():
if 3 < 4 and 5 >= 5: # Start coding here!
return True
# the code inside this block!
elif True and not False:
return True
else:
return "None are Good"
print the_flying_circus(4)
print the_flying_circus(5)
print the_flying_circus(6)


#6

Make sure that the_flying_circus() returns True

def the_flying_circus():
if 1 > -1 and 12 < 13: # Start coding here!
return True# Don't forget to indent
# the code inside this block!
elif 12 <= 12:
return True# Keep going here.
# You'll want to add the else statement, too!
else:
print "Something went wrong!"

the_flying_circus()

#7

It wont work for me.


#8

OMGG thank you!!
that has honestly made my day!
ive been stuck on that for ages XD


#9

just type
return True
inside of the def block

My code

ui = raw_input("What is 1 + 1? > ")
def the_flying_circus():
    if 2:
        print "Yes"
    elif ui < 2 or ui > 2:
        print "No"
    else:
        print "Try Again"
    return True

#10

Thank you very very very much!!!
I did it! Yeah!


#11

def the_flying_circus():
if 9 <= 9:
return True
print "It's true"
elif 6 == 8 or 99 < 88:
return False
else:
return False


#12

i tried one of my code and it worked but it didn't print...then i tried yours and it didn't print then too...can u tell me why print statement won't show anything???


#13

you have to call the defined function outside of the def so like so

ui = raw_input("What is 1 + 1? > ")
def the_flying_circus():
    if 2:
        print "Yes"
    elif ui < 2 or ui > 2:
        print "No"
    else:
        print "Try Again"
    return True
the_flying_circus()

Just an fyi my code doesnt acual print the right answer im just using it to show where to put it.
Fixed it this one works.(kept both to show how i fixed it if you need it for something)

ui = raw_input("What is 1 + 1? > ")
def the_flying_circus():
    if ui == "2":
        print "Yes"
    elif ui < 2 or ui > 2:
        print "No"
    else:
        print "Try Again"
    return True
the_flying_circus()