Please help with this code it says wrong indentation


#1

def the_flying_circus(ans):
ans=5
if ans>=5 or ans<=5: # Start coding here!
# Don't forget to indent
# the code inside this block!
return 1
elif ans==5:
return -1
else:
print"error"
# Keep going here.
# You'll want to add the else statement, too!


#2

Hello

If you look at the example provided -

if this_might_be_true():
print "This really is true."
elif that_might_be_true():
print "That is true."
else:
print "None of the above."

There are indentations.

I will help you with the first bit -

def the_flying_circus():
if 10 > 5 :
return ...................
print ......................

You need to type something after 'return' and 'print'. (Look at the example for conditional statements.)
The elif and else I leave to you.

Hope that helps.


#3

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