Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson5_1
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b7c97470
authored
Nov 07, 2020
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
97a02a06
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
1.py
1.py
View file @
b7c97470
import
turtle
import
turtle
#调用海龟画图库
s
=
1
#设置初始长度变量
pen
=
turtle
.
Pen
()
# 请创造师在下面接着创作
pen
=
turtle
.
Pen
()
#设置画笔变量pen
pen
.
speed
(
0
)
#设置画笔速度
for
i
in
range
(
300
):
#有限循环300次,注意括号和英文的冒号
pen
.
forward
(
s
)
pen
.
right
(
91
)
s
=
s
+
1
# 隐藏画笔,保存画布
pen
.
hideturtle
()
turtle
.
done
()
\ No newline at end of file
pen
.
forward
(
s
)
#前进s步
pen
.
right
(
91
)
#右转91度
s
=
s
+
1
#变量s每次+1
pen
.
hideturtle
()
#隐藏画笔
turtle
.
done
()
#保存画布
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment