Python Lesson Loops Exercise 4. Simple errors


I think I code the while conditions just right.

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

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

But why does it keep looping?


use the and operator instead of the or operator. :slight_smile:


Well I just realized that the instruction clearly says 'AND'. Also that makes sense. Thanks for having me realize that mistakes!


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