The_flying_circus() should return True, instead it returned: 'True'


#1

Error Message: Oops, try again. the_flying_circus() should return True, instead it returned: 'True'

Here is my code:

def the_flying_circus():
if 13 != 14:
return "True"
print "Heck Yeah."
elif not True:
return "False"
else:
return "False"

Why, WHY, is this happening?
`


#2

you should return a Boolean value, not a string


#3

Like this?

def the_flying_circus():
if 13 < 14:
return "(3 < 4) and (5 >= 5)"
print "Heck Yeah."
elif not True:
return "False"
else:
return "False"

Error: Oops, try again. the_flying_circus() should return True, instead it returned: '(3 < 4) and (5 >= 5)'

Or like this?

def the_flying_circus():
if 13 < 14:
return "True or False"
print "Heck Yeah."
elif not True:
return "False"
else:
return "False"

Error: Oops, try again. the_flying_circus() should return True, instead it returned: 'True or False'


#4

in both cases this condition is true:

if 13 < 14:

in both cases you return a string:

return "(3 < 4) and (5 >= 5)" 
return "True or False"

you don't return a Boolean value


#5

I have in doubt regarding
return 0
return 1
return -1
what does they imply


#6

it simply implies that an integer is returned. I can answer your question in more detail if you go here make a new topic and fill in the template


#7

Not able to understand clearly


#8

i can't give good answers with good questions. If you have a question, you should make a new topic, not reply to an existing topic like you did now


#9

you are returning string in your code. to return Boolean, you type True without the quotation mark


#11

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