title: Python - Input Menu Function
body: <p>I'm quite new to Python and I am trying to make a little adventure game, just to develop my skills. So, for my game, I want there to be a few options, and the player will pick one and it will return a different result. However, the options will not always be the same, so I decided to make a function, so the options and results could differ. Here is the code for my function: </p>
  
  <pre><code>def action(act1, act2, act3, act4):
  loop = True
  while loop:
      print(menu)
      player_action = input("Where would you like to go? ")
  
      if player_action == '1':
          act1
          return
  
      elif player_action == '2':
          act2
          return
  
      elif player_action == '3':
          act3
          return
  
      elif player_action == '4':
          act4
          return
  
      else:
          print("Please type \'1\', \'2\', \'3\', or \'4\'")
  </code></pre>
  
  <p>The parameters are functions for what I want to print out. </p>
  
  <p>My problem is, when I call this function and run the code, Python executes each function in every if and elif statement. For example, when I call this:</p>
  
  <pre><code>def home_act1():
      print("Welcome to the wilderness!")
  
  def home_act2():
      print("Welcome to the town!")
  
  
  def home_act3():
      print("Welcome to the store!")
  
  
  def home_act4():
      print("You left the adventure.")
      exit()
  
  
  action(home_act1(), home_act2(), home_act3(), home_act4())
  </code></pre>
  
  <p>I run the program and it does this:
  Welcome to the wilderness!
  Welcome to the town!
  Welcome to the store!
  You left the adventure.</p>
  
  <p>Process finished with exit code 0</p>
  
  <p>It seems to just be running all four of my parameters, it worked before I made it a function but something isn't working right. </p>
  
  <p>Thanks to any help!</p>