-2
end_program = False
while end_program == False:
    user_choice = input('\nWould you like to play a game?\n Please pick yes or no\n').lower()
    if user_choice != 'yes' or 'no':
        print('You didn\'t pick yes or no...try again please\n')
        end_program = False
    else:
        end_program = True
CDJB
  • 14,043
  • 5
  • 29
  • 55
Shyber
  • 23
  • 4

1 Answers1

0

Try this:

end_program = False
while end_program == False:
    user_choice = input('\nWould you like to play a game?\n Please pick yes or 
    no\n').lower()
    if user_choice != 'yes' or user_choice !='no':
       print('You didn\'t pick yes or no...try again please\n')
       end_program = False
    else:
       end_program = True

When checking multiple conditions you need to be specific: You can't say: if user_choice!= 'yes' or 'no' Having the 'no' here is causing the error. You will need to check if condition individually:

if user_choice != 'yes' or user_choice != 'no':
AdeEla
  • 279
  • 1
  • 3
  • 13