In my code, I have a "would you like to play again" feature. For some reason when I put no, it runs it through the not yes or no loop before stopping the code. Why is it doing this? Here is my code:
again = input('Would you like to play again?\t')
while again != ('yes') or ('no'):
print ('Error code 1: Please try again!')
again = input('Would you like to play again?\t')
if again == ('yes') or ('no'):
break
if again == ('no'):
break
Here is my output:
Would you like to play again? no
Error code 1: Please try again!
Would you like to play again? no