Question: please use python and # to explain what you are doing. please be aware there are hidden test all these photos are apart of the


Areas and perimeter What's interesting about fractals is their area and perimeter. If you have a polygon (X1. Y.).(*2.93),... (x. Yn), you can find the area via. (x:+1 - x:) y,+ Yit! . 0 11 and the perimeter via 3 (4141 x)2 + ... ,)? where we have used the convention that Xn+1 = xi and +1 = y. Write functions to implement the above and compute area and perimeter of a polygon det poly_area (polygon) ***Returns the area of a polygon... # YOUR CODE HERE 1 import math def poly perimeter (polygon) "Returns the perimeter of a polygon.*** # YOUR CODE HERE # Here you can test your code. YOUR CODE HERE Code Text Let us test both functions. 0 10 points: area and perimeter of polygons. polyi - ((0, 0), (1, 2), (2, 0)) assert poly_area (polyi) = 2 assert abs (poly_perimeter (polyi) 6.472)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
