Python: TypeError: 'int' object is not callable. Most likely a easy fix. cant seem to fiture out how to fix it
<p>here is the a section of the code.</p>

<pre><code>import math

length_centre=eval(input("Enter length from centre to corner of pentagon: "))
side_length= 2*length_centre*(math.sin(math.pi/5))
print(side_length)

areaP =(5((side_length)**2))/(4*((math.tan)((math.pi)/5)))
print(areaP)
</code></pre>

<p>error for the code:</p>

<p>areaP =(5((4)**2))/(4*((math.tan)((math.pi)/5)))
TypeError: 'int' object is not callable</p>

<p>Programming languages don't have implicit multiplication like written math, so <code>5((side_length)**2)</code> is not legal, it's trying to call <code>5</code> as a function with argument <code>side_length ** 2</code>. I'm guessing you want <code>5 * side_length**2</code> (removing some extraneous parens that aren't needed since exponentiation binds more tightly than other math ops anyway).</p>

<p>Cleaning it all up, you'd have:</p>

<pre><code>import math

# Use float to get the specific type you want, rather than executing whatever
# code the user types. If this is Py2, change input to raw_input too,
# because Py2's input is equivalent to wrapping raw_input in eval already
length_centre=float(input("Enter length from centre to corner of pentagon: "))

# Strip a whole bunch of unnecessary parens
side_length = 2 * length_centre * math.sin(math.pi / 5)
print(side_length)


# Strip a whole bunch of unnecessary parens (left in some technically unnecessary parens
# because they group the complex operands for the division visually)
areaP = (5 * side_length**2) / (4 * math.tan(math.pi / 5))
print(areaP)
</code></pre>

python int