Does your code accept anything other than y or n


#1



https://www.codecademy.com/courses/python-beginner-en-cxMGf/0/4?curriculum_id=4f89dab3d788890003000096#

I was getting the error message
"Oops, try again. Does your code accept anything other than "y" and "n"?"
even though while testing my code it didn't accept anything other than y and n which I assume is the desired result


choice = raw_input('Enjoying the course? (y/n)')

while choice != "y" and "n":  # Fill in the condition (before the colon)
    choice = raw_input("Sorry, I didn't catch that. Enter again: ")
    break


#2

you have to verifi thtat choice does not eqaul to n and choices does not equal to y , so to correct it your code will be like this

hoice = raw_input('Enjoying the course? (y/n)')

while choice != "y" and choice != "n":  # Fill in the condition (before the colon)
    choice = raw_input("Sorry, I didn't catch that. Enter again: ")
    break