While Loop Fail - Caesar Cipher
I'm having a problem where when I ask my program to quit out it prints like I ask it to, however shows my menu of options as well continuously. So I'm getting this: >>> (
Solution 1:
x != 'q' or 'Q'
is being handled as (x != 'q') or 'Q'
, and 'Q' is always True.
It would better be:
x not in 'qQ'
or x.lower() != 'q'
Post a Comment for "While Loop Fail - Caesar Cipher"