绘制效果:
源代码:
# 叠边形 import turtle turtle.setup(650,350,200,200) turtle.penup() turtle.fd(-100) turtle.left(-90) turtle.fd(100) turtle.right(90) turtle.pendown() turtle.pensize(5) turtle.pencolor("black") for i in range(9): turtle.right(80) turtle.fd(150) turtle.done()