title: How do I get values from a dictionary run them through an equation and return the key with the greatest value
body: <p>So my assignment has been easy up to this point. Useing Python 3</p>
  
  <p>GetSale - Finds the maximum expected value of selling a stock. The expected sale value of a stock is the current profit minus the future value of the stock:
  Expected Sale value = ( ( Current Price - Buy Price ) - Risk * CurrentPrice ) * Shares
  The GetSale function should calculate this value for each stock in the portfolio, and return the stock symbol with the highest expected sale value.</p>
  
  <p>We are using 3 separate dictionaries: Names, Prices and Exposure.</p>
  
  <p>For the GetSale I know I need to call the Prices and Exposure dictionaries to get the values for the equation; however, I have no idea how to get those values and run them. </p>
  
  <p>so far this is the code:</p>
  
  <pre><code>Names = {}
  Prices = {}
  Exposure = {}
  
  def AddName():
      name = input('Please enter the company name: ')
      stock_symbol = input('Please enter the comapny stock symbol: ')
      Names[name] = stock_symbol
  
  def AddPrices():
      stock_symbol = input('Please enter the company stock symbol: ')
      Buy_Price = float(input('Please enter the buy price: '))
      Current_Price = float(input('Please enter the current price: '))
      Prices[stock_symbol] = 'Buy_Price:', [Buy_Price], 'Current Price', [Current_Price]
  
  def AddExposure():
      stock_symbol = input('Please enter the company stock symbol: ')
      Risk = float(input('Please enter the risk of the stock: '))
      Shares = float(input('Please enter the shares of the stock: '))
      Exposure[stock_symbol] = 'Risk:', [Risk], 'Shares:', [Shares]
  
  def AddStock():
      AddName()
      AddPrices()
      AddExposure()
  </code></pre>
  
  <p>I know that it must somehow be done with a loop since it will have the run the equation over and over to find the greatest Expected Sale Value and then it will return the Stock Symbol of the greatest one.</p>
  
  <pre><code>def GetSale():
      for stock_symbol, Buy_Price, Current_Price in Prices.items():
  </code></pre>
  
  <p>P.S. I'm sorry if it isn't very clear and specific I tried to make it to the point so please forgive me its only my second post.</p>