15. Turtle Graphics Drawings Use the turtle graphics library to write programs that reproduce each of the designs shown in Figure 2-34. Figure 2-34 Designs West North South East
Added by Susan C.
Close
Step 1
This example will help you understand how to use Turtle to draw shapes and you can then adapt the code to match the specific designs you have. ### Show more…
Show all steps
Your feedback will help us improve your experience
John Incabo and 69 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Akash M.
(Turtle: draw shapes) Write a program that draws a triangle, square, pentagon, hexagon, and octagon, as shown in Figure $3.6 \mathrm{b}$. Note that the bottom edges of these shapes are parallel to the $x$ -axis. (Hint: For a triangle with a bottom line parallel to the $x$ -axis, set the turtle's heading to 60 degrees.)
(Turtle: draw a regular polygon) Write the following function to draw a regular polygon: def drawPolygon $(x=0, y=0, \text { radius }=50, \text { number0fSides }=3):$ The polygon is centered at $(x, y)$ with a specified radius for the bounding circle for the polygon and the number of sides. Write a test program that displays a triangle, square, pentagon, hexagon, heptagon, and octagon, as shown in Figure $6.12 \mathrm{a}$.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Watch the video solution with this free unlock.
EMAIL
PASSWORD