15.The Big IF


#1

Having problems trying to do this, my code is

def the_flying_circus(answer):
if answer > 25 or answer >= 67:
return False
elif answer <= 9:
return False
else:return True

print the_flying_circus(2)

The error message being given is Oops the flying circus should not take any arguments

Any help appreciated

Thanks


#2

like the error message is saying the function should have no arguments but you are providing one argument to the function


#3

what argument am I applying ?


#4

the signature of your function suggests than an argument must be provided when it is called. in this case you called it answer


#5

Thanks

Took out the argument and some other bits, now passed !!


#6

Here is exactly how I did it after struggling several times, but yeah at the end it did work. :smile:

Make sure that the_flying_circus() returns True

def the_flying_circus():
if 10 != 10 % 3: # Start coding here!
return True
# Don't forget to indent
# the code inside this block!
elif 1 > 101:
return False # Keep going here.
# You'll want to add the else statement, too!

(You don't necessarily have to add something!)


#8

Make sure that the_flying_circus() returns True

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


#10