2017년 4월 24일 월요일

python art - turtle(20170424)


python source

import turtle as t
angle = 66
color = ['yellow', 'white', 'green']
c_len = len(color)
t.bgcolor("black")
t.speed(0)
for x in range(200):
    c = x % c_len
    t.forward(x)
    t.color(color[c])
    t.left(angle)

댓글 없음:

댓글 쓰기