Python excersise The Big If


It's about 'The Big If' in Python, I don't know what the problem is, since the code looks quite okay to me.

The code gives me this errorwhen I try to submit it:

The following exception was raised when calling the_flying_circus(): NameError: global name 'anwser' is not defined

This is the code

def the_flying_circus():
    if anwser <5:
        print "Dit is het goede antwoord";
    elif anwser >6 :
       print "Dit is een antwoord dat niet fout is, maar ook niet     goed"
        print "Dit is niet het juiste antwoord"


There is no argument given so none should be used inside the function. answer is not defined.

Please post a link to this exercise so we can review the question and instructions. For sure, the solution is not given in the Hint. That is only a pattern to follow.

Comparison operators:

<, <=, ==, >=, >

Make sure that your program returns True.


You need to place,

As an argument of flying circus,

def the_flying_circus(anwser):


Thank you so much for all your help!
Here is a link to the exercise


Thanks for your help! However, it gives me the error that I shouldn't put any arguments in the_flying_circus :frowning:


In the excercise you are on you are required to use the return statement that will return the boolean True if your if/else blocks are in fact true. So with that in mind you need to consider changing your print''s to return's and restructuring your if and else blocks

and sorry but just remove the argument anwser, my mistake. :slight_smile:


For the record, this is a practice exercise so play with the expressions. Write an if with a comparison that returns True, at least one elif with a comparison that returns True, and an else that returns True. Yes, it seems pointless, but the practice is what is important, here. Not the outcome.


No problem! Thank you!


Thank you for your advice!


A post was split to a new topic: What's wrong?I've tried several times