Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

help me code this spiral pentagon in python please use nested loop. By default, you will be facing to the right, ensure to turn left

help me code this spiral pentagon in python please use nested loop.

image text in transcribed

By default, you will be facing to the right, ensure to turn left by 120 Then, set the background to black and pen colour to magenta as well as the pen width to 2

To draw a single pentagon:

Loop SIX times (yes, six times, not five) to position the turtle at different corner each time

The very first pentagon will have a size of 10 + 2 units (*size" is the length of each side of the pentagon)

The second pentagon will have a size of 10 + 6 units The third pentagon will have a size of 10 + 10 units The fourth pentagon will have a size of 10 + 14 units, and so on...

The rotation angle will be the same as drawing an ordinary pentagon

After each iteration of drawing a pentagon, turn to the right by 1 degree

All in all, there will be 85 pentagons drawn

Assignment 1 - Jonny Smith - js 222

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions

Question

10. Are you a. a leader? b. a follower? _______

Answered: 1 week ago