turtle를 이용한 그림 그리기 1
파이썬2023. 12. 1. 16:00
import turtle
import colorsys
turtle.bgcolor('black')
squary = turtle.Turtle()
squary.speed(20)
h = 0
# squary.pencolor('red')
for i in range(400):
squary.pencolor(colorsys.hsv_to_rgb(h, 1, 1))
squary.left(102)
squary.forward(i)
h += 0.005
turtle.done()
