admin 管理员组

文章数量: 886992

python绘制螺旋六边形

我的turtle angie代码有什么问题?

我的代码:import turtle

def draw_square(some_turtle):

for i in range (1,5):

some_turtle.forward(200)

some_turtle.right(90)

def draw_art():

window = turtle.Screen()

window.bgcolor("black")

#Turtle Brad

brad = turtle.Turtle()

brad.shape("turtle")

brad.color("yellow")

brad.speed(6)

brad.pensize(2)

for i in range(1,37):

draw_square(brad)

brad.right(10)

#Turtle Angie

angie = turtle.Screen()

angie.shape("turtle")

angie.color("blue")

angie.speed(5)

angie.pensize(2)

size=1

while (True):

angie.forward(size)

angie.right(91)

size = size + 1

window.exitonclick()

draw_art()

这是我希望它看起来像我的照片。我希望布拉德的外部显示,然后内部的圆圈包括螺旋。它应该看起来像附加的螺旋图像。谢谢!

本文标签: python绘制螺旋六边形