The big if


#1

def the_flying_circus(Age):
if (Age < 18) or (Age == 18) : # Start coding here!
return True
print "Pay $15"
elif (Age > 18) :
return True
print "Pay $15 too"
else:
return False
print "Can't go through"

File "python", line 4
return True
^
IndentationError: expected an indented block


#2

Hello

It is indicating alignment.

This is just an example -

Notice the return is not directly underneath def, if, else - it is indented.

Hope that helps.


#3

i didnt write it that way, it was only the copy-paste, writing return not directly underneath the def, if or else indicates "Oops, try again. the_flying_circus should not take any arguments."


#4

Hello

Can you send me a screen shot of your code?

Thanks


#5

Hello

You have entered an argument called Age.
the_flying_circus(Age), should be the_flying_circus().
This means that you must change all 'Age' in all your statements.

For example -

if (16 < 18) or (18 == 18):

The instructions must be followed to the letter. You will view that the comment above the lesson, indicates that the flying circus has no argument.

"Make sure that the_flying_circus() returns True".

Hope that helps.


#6

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