python 画一朵花(基于Turtle)
import turtle as tscreen=t.Screen()length_ofside=0#边长的长度thick=0#每条边的粗细t.speed(100)colorlist=['red','yellow','green','blue','orange','purple']for j in range(1,361): length_ofside = 1 t.forward(length_ofside) t.left(61) t.pensize(length_ofside // 50) t.color(colorlist[j%6])screen.exitonclick()
用户评论