title: Division by zero using // operator in python
body: <p>Running the following code:</p>
  <pre><code>p = int(input(&quot;principal: &quot;))
  interest = int(input(&quot;annual interest rate: &quot;))
  years = int(input(&quot;# of years: &quot;))
  
  r = interest // 100
  
  n = years * 12
  
  top = r * (1 + r) ** n
  
  bottom = (1+r) ** n - 1
  
  fraction = top // bottom
  
  A = fraction * p
  print(A)
  </code></pre>
  <p>I get:</p>
  <pre><code>line 17, in &lt;module&gt;
      fraction = top // bottom
  ZeroDivisionError: integer division or modulo by zero
  </code></pre>
  <p>I am a beginner, please be kind!</p>