import turtle

L=50 
N=6 
jiaodu=180-360/(N) 
tl=turtle.Turtle() 
#tl.speed(0)
tl.screen.delay(0) 

def f1():
tl.fillcolor("yellow") 
tl.begin_fill() 
for i in range(3):
tl.fillcolor()
tl.forward(L)
tl.right(120)
tl.end_fill() 

for i in range(N):
tl.left(jiaodu) 
tl.penup()
tl.forward(L)
tl.pendown()
tl.right(180) 
f1()

 

posted on 2020-03-13 23:46  R救赎  阅读(169)  评论(0)    收藏  举报