题目:绘制下面的图形
解析:
考察 turtle 绘制正方形。每次转过的角度都是 90 度。
答案:
不使用循环。
import turtle as t
t.fd(100)
t.rt(90)
t.fd(100)
t.rt(90)
t.fd(100)
t.rt(90)
t.fd(100)
t.rt(90)
使用循环。
import turtle as t
for i in range(0,4):
t.fd(100)
t.rt(90)
来源:玩转Python海龟绘图
来源:CSDN
作者:judi0713
链接:https://blog.csdn.net/u014297578/article/details/102776217