0

Im creating a program in pycharm for school. I've pasted my code below, I am trying to get my else statements to trigger as I write the code but every time I test it the code only triggers the if part no matter the input. Any help is appreciated! tried making the input a string, gave the else statement a condition by changing it to an elif

if search1 == 'yes' or 'Yes' or 'YES' or 'y' or 'Y':
    print ('* You observe the layout of the room *')
    print('* There is a door in each cardinal direction with the one to the south being the locked door you '
          'entered *')
else:
    print('* With no determination to defeat the demon lord, you sit and eventually perish. *')
Dima Chubarov
  • 16,199
  • 6
  • 40
  • 76

0 Answers0