``import turtle as t
import random
t.penup()
t.shape('square')
t.hideturtle()
# 关闭摄像机
t.tracer(0)
# 如果n = 1
def yi():
t.fillcolor('red')
for i in range(4):
t.stamp()
t.forward(70)
# 如果n = 2
def tian():
t.fillcolor('yellow')
for i in range(4):
t.stamp()
t.forward(70)
t.right(90)
![效果](https://img-blog.csdnimg.cn/f6aac792becf4a9d83f373774fd92bfe.png#pic_center)
【俄罗斯方块动画】-准备阶段
最新推荐文章于 2024-10-16 17:48:16 发布