title: Interest calculator on Python
body: <p>I know that this has been asked already, but I'm having trouble with how I should implement this so I'm asking here.</p>
  
  <p>My python code so far is:</p>
  
  <pre><code>def calculate():
      p = 10000 # dollars
      n = 12 # months
      r = 8 # interest %
      t = float(raw_input("Type the number of year that the money will be compounded for:"))
      b = p * r
      a = b ** t
      print(a)
  
  calculate()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/xGXFJ.png" rel="nofollow noreferrer">Math formula</a></p>