Answer:
Follows are the python code to this question:
import math as m #import package
n=int(input('Enter the number of sides:'))#defining n variable for input number of side
s= float(input('Enter the side: '))#defining s variable for input side value
area = (s*s *n)/(4 * (m.tan(m.pi/n)))#defining formula for calcaulting area
print (area)#print area
Output:
please find the attached file.
Explanation:
In the above code, firstly, we import the math package as m, and after that, two-variable "n and s" is defined, which uses for input integer and float value from the user end.
- In the next step, we use the area formula that is already in the question.
- In this formula, we modify some value and put the user input into the area formula, and print its value.