資源簡介
代碼片段和文件信息
import?turtle?as?t?#as的作用是將turtle庫給予別名t
t.setup(80060070090)#width=800height=800?startx=100?starty=100
t.bgcolor(“red“)#背景顏色紅色?????#可以用t.screensize(800600“red“)
t.color(“yellow““yellow“)#畫筆的顏色黃色
t.speed(8)#畫筆畫的速度
dian_mia?=?[(-300100)(-70180)(0110)(030)(-70-20)]
dian_sth?=?[055305-20]
for?i?in?range(5):
????t.up()
????t.goto(dian_mia[i])
????t.setheading(dian_sth[i])#turtle.setheading(angle)設置當前朝向為angle角度。
????t.begin
- 上一篇:dronet源碼+論文(深度學習)
- 下一篇:python 畫 金字塔代碼
評論
共有 條評論