It must be indentation problem.
First you have to know that you enter in the loop only if the output of the condition in the
AND because AND returns
true only if all the conditions are
true. ie with AND you will enter in the loop only if
choice is different from
"y" and at the same time different from
choice can be anything.. but not
eg: choice = "test"
OR you will always enter in the loop (infinite loop) because the operator
OR always returns
true if at least one condition is
true and it will return
false only if all the conditions are
In the case of this exercice, the 2 conditions can never be false at the same time because
choice can't take the values
"n" at the same time.... And according to the conditions, you can observe that only
"n" can return false.