Question: Python 3 please Exercise 3. Colored polygons. Write a function cpolygon(n, size) that takes in two arguments: n (the number of sides of a polygon),

Python 3 please
Exercise 3. Colored polygons. Write a function cpolygon(n, size) that takes in two arguments: n (the number of sides of a polygon), and size (its side length in pixels). The function draws an n-sided polygon with alternating black and red colors. Hint: The function turtle.color(col) changes the color of the pen to col, which is a string specifying the desired color (black, red, etc.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
