Question: Problem 1. Regular Polygons (5 points) Write a program named polygons.py that has two functions for generating convex regular polygons Regular polygon - Wikipedia G.

Problem 1. Regular Polygons (5 points) Write a program named polygons.py that has two functions for generating convex regular polygons Regular polygon - Wikipedia G. One function should be implemented using an iteration (a for loop), and another function should be a recursion. It is optional to fill in your shapes. The functions for generating polygons should be named polygon (size, n ) and polygon_recursive(size, n, level) where size is the size of the polygon side (edge), n is the number of sides (or angles), and level is the level of recursion initially equal to n. Problem 2. Star Polygons (5 points) Write a program named stars.py that has two functions for generating star polygons. One function should be implemented using an iteration (a for loop), and another function should be a recursion. It is optional to fill in your shapes. The functions for generating stars should be named star (size, n,d=2 ) and star_recursive (size, n, level, d=2 ), where size is the size of the polygon side (edge), n is the number of sides (or angles), d is a density or winding number that she equal to n. You can read about star polygons here: Star polygon - Wikipedia
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
