So this is called boolean login.

`X or Y`

at least one is true => `True`

`X and Y`

both have to be true => `True`

The `!=`

is probably what is tripping you up here.

With an `or`

:

`choice != "y" or choice != "n"`

. If you think about it this will always be true. If choice is “a” `choice != "y"`

is true so it loops. If choice is “y” `choice != "n"`

is true so it loops. If choice is “n” `choice != "y"`

is true so it loops. Whatever you input the condition will always be true so it loops forever.

Whereas with an `and`

:

`choice != "y" and choice != "n"`

. This will only be true if choice is neither “y” or “n”. If choice is “a” `choice != "y"`

is true and `choice != "n"`

is true so it loops. If choice is “y” `choice != "y"`

is false so it **doesn’t** loop. If choice is “n” `choice != "n"`

is false so it **doesn’t** loop. It will only loop if you don’t enter “y” **and** you don’t enter “n”.

It might be easier to convert the statement:

`choice != "y" and choice != "n"`

is equivalent to `not (choice == "y" or choice == "n")`

so it is true if your choice is not y or n.

Hope that helps