题目:绘制下面的图形
解析:
综合应用,绘制有对角线的正方形。
答案:
不用循环
import turtle as t t.fd(100) t.rt(90) t.fd(100) t.home() t.rt(90) t.fd(100) t.undo() t.lt(90) t.fd(100)
使用循环
import turtle as t for i in range(0,6): t.fd(100) t.rt(90) t.home()
综合应用,绘制有对角线的正方形。
不用循环
import turtle as t t.fd(100) t.rt(90) t.fd(100) t.home() t.rt(90) t.fd(100) t.undo() t.lt(90) t.fd(100)
使用循环
import turtle as t for i in range(0,6): t.fd(100) t.rt(90) t.home()