What is wrong with this code? #Write your two "if" statements below! x = 2 def true_function(): if x == 2: #Fill in your `if` statement here! return #Make sure this function returns `True` def false_function(): if x == 3: #Fill in your `if` statement here! return #Make sure this function returns `False` Make sure 'true_function()' is returning True! Oops, try again. I've tried all sorts of statements for True 3 == 3 etc but I still get the same comment.
eh? did you put True after the word return in the function?
Thanks Shadowys , it was looking me in the face, doh. It works now with True and False inserted.
A "return" with nothing to pass implies the result returned is None.
you're welcome! :)
Join our real-time social learning platform and learn together with your friends!