快捷搜索:  汽车  科技

如何用python绘制几何图案(用python画旋转的正方形形成的几何图形)

如何用python绘制几何图案(用python画旋转的正方形形成的几何图形)for i in range(500):squary.pensize(1.5)squary=turtle.Turtle()squary.speed(10)squary.color("blue")

用python画旋转的正方形形成的几何图形,源码如下:

如何用python绘制几何图案(用python画旋转的正方形形成的几何图形)(1)

用python画旋转的正方形形成的几何图形

import turtle

squary=turtle.Turtle()

squary.speed(10)

squary.color("blue")

squary.pensize(1.5)

for i in range(500):

squary.forward(i)

squary.left(91)

squary.speed(i 20)

turtle.done()

猜您喜欢: