0

This code is for a basic adventure game I am writing. I keep getting dead('you become a workaholic etc...') even when I input 'refuse' or 'sdef' in Python.

Help!!

from sys import exit

def dead(why):
   print why
   exit(0)

def nyc():
   print '''You arrive in NYC and have a bank job lined up. will you take it or leave it?'''

   choice = raw_input('> ')

   if 'take' or 'accept' in choice:
       dead('You become a workaholic and die of heart failure.')

   elif 'refuse' or 'decline' or 'leave' or 'not' in choice:
       bum()

   else:
       dead('Its banking or no deal buddy...you dead')

1 Answers1

1
if 'take' in choice or 'accept' in choice:

Correct one is this. Otherwise your if statement evulates always True. You have to write every condition in there.

  • Wrong

    if something or something1 and something2 in somewhere:

  • Correct

    if something in somewhere or something1 in somewhere and something2 in somewhere:

GLHF
  • 3,835
  • 10
  • 38
  • 83