Commit 6acf83b5 by BellCodeEditor

auto save

parent a075876f
Showing with 5 additions and 15 deletions
import turtle 列表的组成: 列表名=[元素1,元素2,元素3,......]
获取列表的长度(元素个数):len(列表名)
pen = turtle.Turtle() 获取列表中的元素:列表名[索引]
pen.color('sienna') 索引可以用来表示列表中元素的位置
# 画布大小 \ No newline at end of file
w = turtle.Screen()
w.bgcolor('wheat') # wheat小麦
# 移动到起点
pen.left(90)
pen.up()
pen.backward(150) # 后退
pen.down()
turtle.done()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment