Big if problem


#1

hello experts... please help me out with this code... i couldn't understand the problem... thanks in advance

def the_flying_circus():
a = 10
if (a % 2 == 0 and a % 5 == 0):
print "if works"
elif (a != 5 or a % 23 == 9 ):
print "elif works"
else:
print "nothing"
the_flying_circus()


#2

def the_flying_circus():
    a = 10
    if (a % 2 == 0 and a % 5 == 0):
        print "if works"
    ...

I'm not sure what error you are getting, but you need to firstly make sure your code is consistantly indented throughout your program like the example above.


#3

Ahh after reviewing the lesson, is says "the_flying_circus() must return True when evaluated."

You have only printed statements. Just pass a return True to one of the conditionals and you should be good to go.


#4

Thanks a lot... :slight_smile: