On 02/26/2016 09:26 PM, Steven D'Aprano wrote:
On Fri, Feb 26, 2016 at 08:30:19PM -0500, Ken G. wrote:
side = ""
while side != "0" or side != "1" or side != "2":
That will only exit if side == "0", "1" and "2" **at the same time**.
Clearly that is impossible, so the condition is always true, a
On Fri, Feb 26, 2016 at 08:30:19PM -0500, Ken G. wrote:
> side = ""
> while side != "0" or side != "1" or side != "2":
That will only exit if side == "0", "1" and "2" **at the same time**.
Clearly that is impossible, so the condition is always true, and the
while loop will never end.
Trying to
The last point I forgot to add: be careful about the "englishness" of 'and'
and 'or'. The way we use them in day to day language among humans is
different than what those terms mean in computer programming. It can be a
sticking point for some beginners, so just be aware of that nuance.
(And apol
On Feb 26, 2016 5:30 PM, "Ken G." wrote:
>
> I have been unable to get out of the following
> loop. No matter what I entered, I can not get
> get out of the loop. The only way I can stop
> the routine is CTRL-C.
Yes: the condition on there code is unfortunately a tautology: it's always
going to b
I have been unable to get out of the following
loop. No matter what I entered, I can not get
get out of the loop. The only way I can stop
the routine is CTRL-C.
If an entry is either 1, 2 or 3, then I should
be able to proceed. I am sure the correct solution
is very simple but I don't see it.
Th