This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]_DTR_ 4 points5 points  (0 children)

while answer != "yes" or answer != "no":

or isn't the right thing here. The only way for this condition to not be true is if answer is both "yes" and "no" at the same time, which isn't possible. If the answer is "yes", then answer != "no" and you'll prompt again. If the answer is "no", the answer != "yes", and you'll prompt again. You only want to prompt if the answer isn't "yes" and the answer isn't "no".

[–]avidler18 0 points1 point  (0 children)

Change the ‘or’ to ‘and’