Friday, January 7, 2022

Хос тойрог Python Turtle Art

 


import turtle
import colorsys
wn = turtle.Screen()
wn.bgcolor('black')
n = 20
h = 0
turtle.speed(1)
for i in range(30):
    c = colorsys.hsv_to_rgb(h, 1, 0.8)
    h += 1 / n
    turtle.color(c)
    turtle.circle(5*i)
    turtle.circle(-5*i)
    turtle.left(i)
turtle.exitonclick() #зурж дуусаад товших хүртэл дэлгэц хаагдахгүй.


No comments:

Post a Comment