Else Problems, I Feel Bad for You, Son... Doubt


#1

answer = “'Tis but a scratch!”

def black_knight():
if answer == “'Tis but a scratch!”:
return True
else:
return False # Make sure this returns False

def french_soldier():
if answer == “Go away, or I shall taunt you a second time!”:
return True
else:
return False # Make sure this returns False

To return False to the black_knight function it should enter in the else statement, doesn’t it? Or maybe I didn’t understand what is the “this”. Help please!


#2

It refers specifically to that return statement, is all. So long as your code has the correct indentation it should be fine and the comments can be removed.


#3

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