The Big if


#1



can anyone tell what is the problem ...??

the big if


Oops, try again. the_flying_circus should not take any arguments.


the_flying_circus() must return True when evaluated.


# Make sure that the_flying_circus() returns True
def the_flying_circus(there):
    if there == 5:
        print "i am awesome!"  # Start coding here!
        # Don't forget to indent
        # the code inside this block!
    elif there == 4:
        print "average"
    else:
        print "not good"
        # Keep going here.
        # You'll want to add the else statement, too!
        print the_flying_circus(5)


#2

here:

def the_flying_circus(there):

this exercise won't allow a parameter, so remove there.

your function only prints? It never returns anything (use the return keyword)

The function call:

print the_flying_circus(5)

place it outside/after the function


#3

After removing "there" this is what i got:
The following exception was raised when calling the_flying_circus(): NameError: global name 'there' is not defined


#4

I suggest you remove there, because the exercise doesn't allow a function parameter. This of course means, you have to define there somewhere else...


#5

this is how the code looks now

def the_flying_circus():
    if there == 5:
        return "i am awesome!"  # Start coding here!
        # Don't forget to indent
        # the code inside this block!
    elif there == 4:
        return "chintu"
    else:
        return "chirkut and popat"
        # Keep going here.
        # You'll want to add the else statement, too!
        print the_flying_circus()

i have replaced print to return and removed there...
where can i define it now..?


#6

but your function still doesn't return True? Your function call is still inside/part of your function content? You could define there inside the function:

def the_flying_circus():
    # define there here

#7

again error :expected an indented block


#8

can i see an updated version of your code? I am trying to help, please keep thinking about what you do is logic.


#9

def the_flying_circus():
    if 5 > 4 and 10 <= 10:    # Start coding here!
        # Don't forget to indent
        # the code inside this block!
    elif 5 < 4 and 10 <= 10:
        # Keep going here.
        # You'll want to add the else statement, too!
        
    else: 
        print True

#10

your if and elif should do something? They can't be empty:

if 5 > 4 and 10 <= 10:
   print "you should print something here, or return something, at least do something"
   print "it can't be empty, if you don't know what to do, use pass"

#11

Sorry for so many questions,,,
Thanks for the help problem solved.....


#12