A50705. 请使用海龟画一个十字架,十字架长度为100。【注意:最后绘图结果请隐藏海龟t.hideturtle()】
填空题
中等
知识点
题目描述
请使用海龟画一个十字架,十字架长度为100。
【注意:最后绘图结果请隐藏海龟t.hideturtle()】

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