题目:绘制下面的图形
解析:
综合命令使用。
答案:
不使用循环。
import turtle
as t
t
.fd
(100)
t
.bk
(100)
t
.rt
(90)
t
.fd
(100)
t
.bk
(100)
t
.rt
(90)
t
.fd
(100)
t
.bk
(100)
t
.rt
(90)
t
.fd
(100)
t
.bk
(100)
t
.rt
(90)
使用循环。
import turtle
as t
for i
in range(0, 4):
t
.fd
(100)
t
.bk
(100)
t
.rt
(90)
来源:玩转Python海龟绘图
转载请注明原文地址: https://mac.8miu.com/read-500707.html