Write a function areaperim that will calculate both the area and perimeter of a polygon. The… 1 answer below »

Write a function areaperim that will calculate both the area and perimeter of a polygon. The radius r will be passed as an argument to the function. If a second argument is passed to the function, it represents the number of sides n. If, however, only one argument is passed, the function generates a random value for n (an integer in the range from 3 to 8). For a polygon with n sides inscribed in a circle with a radius of r, the area a and perimeter p of the polygon can be found by

Save your time - order a paper!

Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines

Order Paper Now

 

"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"