title: Calling Function in Function without Arguments
body: <p>Quick question: </p>
  
  <p>I want to call a main function without any arguments, and within the main function, I have several other functions that do have arguments. How would I go about doing this? </p>
  
  <p>Here are the multiple functions:</p>
  
  <pre><code> # Takes the Portfolio dictionay, unpacks the multiple tuples, and calculates
   # the total price of the shares at time of purchase
  
  def total_purchase_price(portfolio):
      totalprice = 0
      totalpurprice = 0
      for item in portfolio:
          purdate, purprice, numshares, sym, curprice = item
          totalprice += purprice * numshares
          totalpurprice = totalprice
      return totalpurprice
  
  # Takes the Portfolio dictionay, unpacks the multiple tuples, and calculates
  # the current total value of the shares
  
  def total_value(portfolio):
      totalprice = 0
      totalvalueprice = 0
      for item in portfolio:
          purdate, purprice, numshares, sym, curprice = item
          totalprice += curprice * numshares
          totalvalueprice = totalprice
      return totalvalueprice   
  
  # Takes the previous two functions, and subtracts them to get the total
  # gain/lost of the shares
  
  def total_gain(total_purchase_price, total_value, portfolio):
      gainlost = total_value - total_purchase_price
      return gainlost
  </code></pre>
  
  <p>ex. What I have right now (note: I know this won't work, just there for what I want, as each function returns a value):</p>
  
  <pre><code>def testQ1(total_purchase_price, total_value, total_gain, portfolio):
      print("Total Cost =", total_purchase_price)
      print("Current Value =", total_value)
      print("Total gain/lost =", total_gain)
      return
  </code></pre>
  
  <p>ex. What I want to achieve:</p>
  
  <pre><code>def testQ2():
      total_purchase_price(portfolio)
      total_value(portfolio)
      total_gain(total_purchase_price, total_value, portfolio)
      print("Total Cost =", total_purchase_price)
      print("Current Value =", total_value)
      print("Total gain/lost =", total_gain)
      return   
  </code></pre>
  
  <p>How would I do this? Thanks</p>