题目:绘制下面的图形

python turtle 100-9
Python 海龟绘图 100 题——第 9 题

解析:

综合应用,绘制长方形。

答案:

不使用循环。
Python
import turtle as t
t.fd(100)
t.rt(90)
t.fd(60)
t.rt(90)
t.fd(100)
t.rt(90)
t.fd(60)
t.rt(90)
使用循环。
Python
import turtle as t
for i in range(0,2):
    t.fd(100)
    t.rt(90)
    t.fd(60)
    t.rt(90)