import turtle
turtle.pensize(2)
turtle.hideturtle()
windSpeed = 20
radius = 50
def windmill(c):
turtle.pencolor(c)
turtle.tracer(False)
for i in range(4):
turtle.forward(2*radius)
turtle.right(90)
turtle.circle(-radius,180)
while True:
windmill('black')
turtle.update()
windmill('white')
turtle.right(windSpeed)
turtle.done()
python动态风车
最新推荐文章于 2024-01-09 18:49:38 发布