Stuck On 'The Big If'!


Hullo hullo! I've been trying to understand what's wrong with my code for a while now, but I can't seem to get it.
This is my code:

def the_flying_circus():
    if the_flying_circus() > 70 and the_flying_circus != 70:
        return True
    elif the_flying_circus() == 68 and the_flying_circus != 67:
        return True
        return False

This is my error message:

Help please!


well first off, you probably want the_flying_circus() in these cases

Secondly, this the_flying_circus is not necessary as far as I can tell.

Thirdly, when call the the_flying_circus(); function you just call it without a parameter in it.


Thank you for replying!

When I called the_flying_circus without a parameter, I got this:

I did what you said, so this is how the code looks now:

def the_flying_circus():
    if the_flying_circus() > 70 and the_flying_circus() != 70:
        return True
    elif the_flying_circus() == 68 and the_flying_circus() != 67:
        return True
        return False

But I still got the same error message as before.


Yeah I got that same error when I tried to do all the_flying_circus() in my if and elif statements. When I had the if statement with numbers and the elif statement with the_flying_circus it passed. I am not sure exactly why this is however. I will try and do some research on it.


So recursion as best as I can tell is when you are calling the function itself from within the function. Now, most of the time this is a bad thing. However, here, in a limited capacity, it does work. I would recommend using numbers only for this lesson but unless we are told otherwise, we can stick if yours.

Also, I just noticed this:

Your still calling the_flying_circus with a parameter of 71? Get rid of it! :smiley:



Please tell me what's wrong here (i am a dense mofo)


@sashaglot notice my earlier reply. Maybe, you should just set up numerical equations instead. Might save you some headaches. For example: if 10 - 5 == 5 and 2 + 2 = 4 return True.


Thank you! Everything worked out.
Btw, is your username a reference to David Mitchell?
Either way, have a good day!


Good glad to have helped! And no... I have never heard of him haha Its a reference to an old tv show I watched as a kid religiously by the same name :smiley: And yes have a great day! :thumbsup:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.