Back to Browse

How to create a Colorful Pentagons using python code?

232 views
Apr 5, 2023
3:30

Code: import turtle t=turtle.Turtle() turtle.setup(width=700,height=700) t.speed(10) colors=['purple','red','green','blue','yellow'] turtle.bgcolor('lightgrey') for i in range(200): t.color(colors[i%5]) t.pensize(i/10+1) t.forward(i) t.left(72) turtle.done() #pentagons #pythonturtle #codingtechnique #100pythonpracticecode

Download

1 formats

Video Formats

360pmp45.4 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

How to create a Colorful Pentagons using python code? | NatokHD