fork download
  1. def print_action(action):
  2. if action == 'look around':
  3. for object in cell_enviroment:
  4. print(object)
  5. elif action in ('talk to rack', 'talk rack', 'rack'):
  6. print ("1")
  7. elif action in ('beg', 'open beg', 'take beg', 'look beg'):
  8. print('2')
  9. elif action in ('stones', 'rocks', 'walk to stones'):
  10. print('3')
  11. elif action in ('help', 'hint'):
  12. for tip in help:
  13. print(tip)
  14. else:
  15. print('Looks like you have amnesia.Try again')
  16.  
  17.  
  18. print_action('stones')
  19. print_action('rack')
Success #stdin #stdout 0.02s 9992KB
stdin
Standard input is empty
stdout
3
1