Simple error


My code is able to run fine , but my code was rejected
The command prompt sends this message..
Oops, try again. Does your code accept anything other than "y" and "n"?

Is my code technically correct?

Replace this line with your code. 
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: ")


you don't do any comparison on the right hand side of your and operator?


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