Friday, January 7, 2022

Таван хошуу Python Turtle Art

 


import turtle
t = turtle.Turtle()
s = turtle.Screen()
s.bgcolor('black')
t.speed(10)
col = ['red', 'yellow', 'green', 'skyblue', 'blue', 'pink', 'white']
c = 0
t.left(36)
for i in range(70):
    t.forward(i*10)
    t.left(144)
    t.color(col[c])
    if c == 6:
        c = 0
    else:
        c += 1


No comments:

Post a Comment