title: Semantic error in Python. Mathematical mistake
body: <p>I am trying to write a program in Python to calculate the area of a polygon. The formula is :</p>
  
  <pre><code>area = n * s * a / 2
  a = s / 2 * tan(pi/n)
  </code></pre>
  
  <p>My code is:</p>
  
  <pre><code>import math
  
  def area(s,n):
      a = s/(2* math.tan((math.pi/n)))
      b = (n*s*a)/2
      return b
  </code></pre>
  
  <p>The problem is that it calculates a total different thing. For example: area (2,5) = 3.63, when it is really 6.887. </p>
  
  <p>Does anyone see a mistake?</p>