Python Turtle Code: Fan

Publié le: 24 février 2022
sur la chaîne: Basic Python Turtle Art
116
1

A drawing of a fan generated by transparent strands and color-filled blades. The Python Turtle code is a bit long with 36 lines because of numerous lines that border the rectangles.

Please feel free to copy and paste the Python Turtle Code. Don't hesitate to ask questions about the code, if you have any. Please subscribe and enjoy!
import turtle
t = turtle.Turtle()
scrin = turtle.Screen()
t.pensize(2)
for i in range(6):
for j in ["red", "orange", "yellow"]: #Colors of fan blades are in 6 sets of red, orange, and yellow.
t.penup()
t.goto(0,-200)
t.pendown()
t.right(90) #Drawing of fan strand starts here.
t.forward(8)
t.left(90)
t.forward(150)
t.left(90)
t.forward(16)
t.left(90)
t.forward(150)
t.left(90)
t.forward(8)
t.left(90)
t.forward(150)
t.fillcolor(j)
t.begin_fill() #Color-filling of fan blade starts here
t.right(90)
t.forward(40)
t.left(90)
t.forward(275)
t.left(90)
t.forward(80)
t.left(90)
t.forward(275)
t.left(90)
t.forward(40)
t.end_fill()
t.left(100.59)
scrin.exitonclick()


Sur cette page du site, vous pouvez voir la vidéo en ligne Python Turtle Code: Fan durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Basic Python Turtle Art 24 février 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 116 fois et il a aimé 1 téléspectateurs. Bon visionnage!