The Big IF


#1

def the_flying_circus():
if (10 == 10): # Start coding here!
print "That\'s right"
# the code inside this block!
elif (True and True):
print "Oh no!"
# You'll want to add the else statement, too!
else:(False or False):
print "All wrong"

Keeps coming up with the error "An exception was raised while running your code, see the console window for the error message."

I'm completely lost here, any changes result in different errors.


#2

How is your code indented?


#3

def the_flying_circus(answer):
    if answer == (10 == 10):
        print "That\'s right"
    elif answer <= (9 < 9) or False:
        print "Oh no!"
    else:
        print "All wrong"

My new error is "Oops, try again. the_flying_circus should not take any arguments."

It is indented correctly but I am unable to post a perfect preview. It only appears as the mess you see above.

Thanks


#4

Please refer to:


#5

3 posts were split to a new topic: The big if


#6

here:

def the_flying_circus(answer):

in this exercise you have the restriction that you can't have a function parameter (answer)


#8

So proud of you :))))


#10

Haha why? but thanks anyway


#11

I have currently been on this problem for 6 hours intermittently I have left my computer came back thinking I have the solution and well I don't:

I understand that if the if statement answered differently the elif statement is then read and if the input to the elif statement is not correct you get the else statement response.

I just cant seem to code this correctly any suggestions?


#12

go here, make a new topic, fill in the template so we have all the details needed to help you


#13

how do you solve it ??


#14


#15