Question: area = p e r i m e t e r a p o t h e m 2 perimeter = n d apothem =
area
perimeter
apothem
where apothem is the shortest distance from the centre of the polygon to one of the polygon sides.
Using the above formulae, write two Python functions:
a Write a Python function areaPoly which given the number of corners, in a regular
polygon and the length of one of its sides, calculate the area of the polygon. You may use some of
the trigonometric functions such as tangent function and constant pi from the math library.
b Write a Python function polySide area which given the number of corners, in a regular
polygon and the polygon area, calculate the length of one of its sides.
areaPoly
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
