Https://www.codecademy.com/courses/learn-python/lessons/conditionals--control-flow/exercises/else-problems-i-feel-bad-for-you-son?action=resume_content_item


#1

https://www.codecademy.com/courses/learn-python/lessons/conditionals--control-flow/exercises/else-problems-i-feel-bad-for-you-son?action=resume_content_item

answer = "'Tis but a scratch!"

def black_knight1():
if answer == “'Tis but a scratch!”:
return True
else: print “No scratch”
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: print “Stay close”
return False # Make sure this returns False

Here’s my code, when I print out my code, nothing appears on the console yet I get no errors, what am I doing wrong? Thank You


#2

There is no output expected. If you wish to see the output, print the return values…

print black_knight()      #  True

print french_soldier()    #  False