Question: Write a Python program using turtle to draw polygons. Name the program as Assignment3_yourname.py. Your name consist of first initial of the first name and

Write a Python program using turtle to draw polygons. Name the program as Assignment3_yourname.py. Your name consist of first initial of the first name and up to 5 letters of your last name.

This assignment mainly uses turtle module but do not use circle() method of the turtle.

You will need to create several functions (suggested functions with name are listed below) for this assignment to draw polygons.

3. SpinPolygon(Turtle, sides, angle, length, repeat): Draws the polygon number of times while turn polygon by the angle on the left each time. Your program needs to ask number of sides, length of the side and number of rotations from the user) Below is a sample image for rotating 5 times. ($CANVAS_COURSE_REFERENCE$/file_ref/g5bd4b6d0e7a9a2da16fa4039c23e9631/preview)

4. ScalePolygon(Turtle, sides, length, sfactor, number): Draws a given number of copies of the specified polygon, with each copy drawn with a length and sfactor times the previous length. i.e. if the sfactor is 2 and number of copies is 4 with initial length of 10, it will draw polygon with side length of 10, 20, 40, 80. Your program needs to ask user for all the necessary values (number of sides, length of the side, scale factor and number of copies) Below is scaling 4 times. ( $CANVAS_COURSE_REFERENCE$/file_ref/gba3161abf77aca29f52db1388499b08f/preview )

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!