Python Turtle Code: Fan

Опубликовано: 24 Февраль 2022
на канале: 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()


На этой странице сайта вы можете посмотреть видео онлайн Python Turtle Code: Fan длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Basic Python Turtle Art 24 Февраль 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 116 раз и оно понравилось 1 зрителям. Приятного просмотра!