Question
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.
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 222Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started