Question: in python please QUESTION 15 Taking advantage of the implementation of draw_polylinel) and the approach in draw_regular_polygon(), write a Python function def draw_starn, outer_r, inner_r,

in python please

in python please QUESTION 15 Taking advantage of the implementation of draw_polylinel)

QUESTION 15 Taking advantage of the implementation of draw_polylinel) and the approach in draw_regular_polygon(), write a Python function def draw_starn, outer_r, inner_r, center, canvas, start_angle=0) where n is the number of points, outer_r and inner_r are the radia for the coincentric circles around the center point of the star that determines how the tips are to be drawn. The canvas is the canvas object obtained from the ezgraphics module. The start angle determines how much the shape should be rotated with respect to the horiztonal. You can see a guided drawing that demonstrates how you should be computing the vertices of the star with 5 ( n-5 ) tips. In the figure below where n=5, the outer radius would be the radius of the blue circle, and the inner radius would be the radius of the green circle. Imagel 'images/png/star.png', width=300 ) NameError Traceback (most recent call last) in ---> 1 Image 'images/png/star.png', width=300) NameError: name 'Image' is not defined With the following setup, the example calls provided further below should run as shown. from ezgraphics import GraphicsWindow win = GraphicsWindow( 1000, 1000) canvas = win.canvas() Example 1: draw_star( 5, 300, 150, (500, 500), canvas, start_angle=D ) should produce: 1: Image 'images/star-example-5-300-150.png', width=400 ) NameError Traceback (most recent call last) in ----> 1 Image( 'images/star-example-5-300150.png', width=480) NameError: name 'Image' is not defined Example 2: draw_star( 8, 300, 150, (500, 500), canvas, start_angle=6 ) should produce: Imagel 'images/star-example-8-300-150.png', width=400) NameError Traceback (most recent call last) in ----> 1 Image 'images/star-example-8-300-150.png', width:400) NameError: name 'Image' is not defined If you understood the lecture on drawing regular polygons from Chapter 06, this exercise will be rather straightforward to solve

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!