area = (n * s ** 2) / (4 * math.tan((180 / n) * (math.pi / 180)))

builtins.TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'

- Code: Select all
`#this program will find the area of a polygon.`

import math

s = input("Enter the number of sides:")

n = input("Enter the length of the side:")

area = (n * s ** 2) / (4 * math.tan((180 / n) * (math.pi / 180)))

print("The area of the polygon is:", area)