You will need to OPEN DOOR to ecape this terrible trap.
What will you do?''')
print('')
def inputCode():
global hasKey
action =input()
if action =='door':
print('You need to OPEN DOOR to escape this insufferable imprisonment.')
print('')
resetAction()
if action =='key':
if hasKey ==True:
print('You are currently holding a KEY, your mind is filled with all the possible uses you could have for such an item! But for now you ponder if it could fit in the DOOR?')
print('')
if hasKey ==False:
print('With a determined display of digit dexterity you picked up the KEY!')
print('')
hasKey =True
resetAction()
if action =='open door':
if hasKey ==False:
print('The DOOR is currently locked, perhaps you can find a KEY?')
print('')
resetAction()
if hasKey ==True:
print('The DOOR swings open and you make a grand escape, vowing to NEVER be outsmarted by a strong breeze and automatically locking door ever again!')