A50722. 如图,使用海龟画图写出电子数字5,其中5的大小为50,即每一笔为50像素长度。【注意:最后绘图结果请隐藏海龟t.hideturtle()】
填空题
较易
知识点
题目描述
如图,使用海龟画图写出电子数字5,其中5的大小为50,即每一笔为50像素长度。
【注意:最后绘图结果请隐藏海龟t.hideturtle()】

参考答案
import turtle
t =turtle.Turtle()
t.forward(50)
t.up()
t.backward(50)
t.right(90)
t.down()
t.forward(50)
t.left(90)
t.forward(50)
t.right(90)
t.forward(50)
t.right(90)
t.forward(50)
t.hideturtle()
上一题
下一题