Typo in "Else Problems, I Feel Bad for You, Son..."


#1



https://www.codecademy.com/courses/python-beginner-BxUFN/3/3?curriculum_id=4f89dab3d788890003000096


answer = "'Tis but a scratch!"

def black_knight():
    if answer == "'This now returns FALSE":
        return True
    else:             
        return False      # Make sure this returns False

def french_soldier():
    if answer == "'Ts but a scratch!":
        return True
    else:             
        return False      # Make sure this returns False

It says "Make sure this returns False" but that is false the excercise requires the function to return True.


#2

What about the function french_soldier()??


#3

French_soldier() is ok. It should be False and lets me continue when it is False.


#4

Can I see all the code please..? or can you make a screenshot?


#5

I'm going to assume you did not post your entire code, or did not complete the entire exercise. Your error is not in the black_knight function, so it must be in the french_solder function. Please post that to let the community help you.


#6

I editted in the entire code though not nececarry.

See the error after making the statement false as instructed on line 7.


#7

you black_knight function is False.it should be True

your if condition is False.if condition should be like

if answer == "'Tis but a scratch!":

now it's True .so your function will return True


#8

Yes, But the comment on line 7 reads #Make sure this returns False.

which is incorrect. as you said it should return True to finish the module.


#9

Instructions:
Complete the else statements to the right.

# Make sure this returns False(comment)

so you just have to write False nothing else

Do what you are told to do no more no less :slight_smile:


#10

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