4/14 simple errors


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

im sorry,i don't understand
1. (choice!=y) and (choice!=n)
2.choice != (y or n)
are the 2 above equal


#2

Note that your post is a bit difficult to read, if you're posting both code and text then make sure to separate them and to mark the code as pre-formatted text so that it is kept intact.

No, those are not equivalent, and you'll have to compare to strings, not variables (unless those variables refer to those strings)

This is what the or-operator does:

If the left side is truthy, return the left side. Otherwise, return the right side.

A few examples:

print 5 or 2 # 5 (bool(5) -> True so 5 is truthy, so `or` returns it)
print True or 'purple' # True (bool(True) -> True, so True is truthy (obviously))
print False or 'purple' # 'purple'

#3

According to Codecademy: Remember, use the != operator to test if two things are different, such as choice != y, and the and operator to check more than one thing, such as A and B.

My original working code was your choice #1 but I ran your intended code on #2 and it worked as well (shown below).

while choice != ('y' or 'n'):

Remember to keep your strings in either double or single quotes