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
64974635
authored
Dec 26, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
4ea37e4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
diy1.py
diy1.py
View file @
64974635
...
...
@@ -13,4 +13,18 @@ for i in range(300):
pen
.
right
(
121
)
# 隐藏画笔,保存画布
pen
.
hideturtle
()
turtle
.
done
()
\ No newline at end of file
turtle
.
done
()
for
循环:
有限次循环,
强调的是循环次数
循环次数
由
range
()
范围
range
(
范围的起始位置
,
范围的终止位置
+
1
,
步长
)
循环次数怎么算:终止位置
+
1
-
起始位置
range
(
5
,
10
)
循环几次:
5
一般情况。起始位置默认为
0
,
终止位置,默认为循环次数
range
(
0
,
300
)
300
0
-
299
\ 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