What is wrong with my code


#1

script.py

1
2
3
4
5
6
7
8
9
10
11
12

Make sure that the_flying_circus() returns True

def the_flying_circus():
if 7>6: # Start coding here!
print "That is true!"
elif (3 > 2) and (5 == 5):
print "This is false!"
# You'll want to add the else statement, too!
else: # this_is_true():
print "This is true!"
the_flying_circus()
That is true!
None

hi help me please why does the_flying_circus in my code not print true


#2

Please indent your code properly


#3

how i just need to know how to make the_flying_circus print true in the console


#4
def the_flying_circus():
    if 7>6: # Start coding here!
        print "That is true!"
    elif (3 > 2) and (5 == 5):
        print "This is false!"
 # You'll want to add the else statement, too!
    else:  # this_is_true():
        print "This is true!" 

the_flying_circus()

Try this...


#5

thanks bandit thou it still returns thats is true!
then none


#6

how do i make the none return true


#7

True is a boolean expression so if you want to return just True Remove the "that is true" and type in True all alone.


#8

But in doing so change all the strings into Booleans i.e(True, False)


#9

this is another task lets me post the error see if u can help me
Oops, try again. the_flying_circus() returned the value None, did you forget to add a return statement?


#10

With booleans you cant print them. Use the return statement for the console to print out the boolean expression


#11

thankyou bro thou am new to this how do i do the return statement?


#12
def the_flying_circus():
    if 7>6: # Start coding here!
        return True
    elif (3 > 2) and (5 == 5):
        return False
 # You'll want to add the else statement, too!
    else:  # this_is_true():
        return True

the_flying_circus()

#13

wow ur awesome bro thanks a lot am done


#14

No problem feel free to ask me for help when you're stuck..Keep coding! :slight_smile:


#15

sure i will do it to the fullest am in full curiosity to understand this comp crap to my best thanks