15. The Big If


#1



https://www.codecademy.com/en/courses/python-beginner-BxUFN/4/1?curriculum_id=4f89dab3d788890003000096


# Make sure that the_flying_circus() returns True
def the_flying_circus():
     print "what is your age "
     a = 1
     if not a < 1
         print "I did not guess that"
         return False
     elif a == 1:
         print "Your only one, I new that"
         return True
    else print "somthing has gone wrong":
print the_flying _circus


#2

this line:

print the_flying _circus

if you want to call the function, you need () at the end, even though you don't give the function any arguments:

print the_flying _circus()

#3

Adding on to @stetim94,

There also shouldn't be a space.


#4

@cadecodes, which space?

@kinksy1000, Also, shouldn't the function return True? if not a < 1 evaluates to True, so False is returned


#5

After the_flying there was a space. :wink:


#6

Can somebody just put in the correct answer


#9

Your program is correct except for a few changes in indentation and alignment i.,e
def the_flying_circus():
print "what is your age "
a =True#change the value of a to True
if not a
print "I did not guess that"
return False
elif a == 1:
print "Your only one, I new that"
return True
else:#colon was missing with a slight alignment mistake
print "somthing has gone wrong":
print the_flying_circus()


#10

I really think something has gone wrong


#11

Just copy and paste my code


#12

what did you do? Your code your code even worse :frowning:

def the_flying_circus():
     print "what is your age "
     a = 1
     if not a < 1 // missing colon, after if there should be a colon
         print "I did not guess that"
         return False // you might want to change this to return True
     elif a == 1:
         print "Your only one, I new that"
         return True
    else print "somthing has gone wrong":
print the_flying _circus // missing () on the function call, and remove space before _circus

see comments in my code, your indent was fine, and now you made it worse in your last version


#13

Posting answers without explanation is not according to the guidelines, your post has been removed


#14
   script.py


1
2
3
4
5
6
7
8
9
10
11

# Make sure that the_flying_circus() returns True
def the_flying_circus():
    print "what is you age"
    a = 1
    if not a < 1:
        print "i did not gaze that"
    elif  a == 1:
           print "your only one, i new that"
    else: "something has gone wrong"
 print  the_flying_circus()

File "python", line 10
print the_flying_circus()
^
IndentationError: unindent does not match any outer indentation level

Save & Submit Code
Reset Code
Oops, try again. An exception was raised while running your code, see the console window for the error message.
Back to Editor
15. The Big If
what is wrong here assist me please


#15

If you want to display indent on the forum, you should format your code:

There is a space before print, remove it. A space is also considered a indention, causing the error


#16

Haha this cracks me up, then how would they understand what they are doing.