n个正方形

1+

from turtle import Turtle,Screen
t=Turtle()
s=Screen()
def d(l,le):
    for x in range(4):
        if le>0:
            d(l//4,le-1)
        t.fd(l)
        t.rt(90)
t.speed(0)
s.delay(0)
d(200,5)
        
1+

发表评论