Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started