Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson12-3
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
fe1ed6f2
authored
Jul 15, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
dc22b1a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
1.py
1.py
0 → 100644
View file @
fe1ed6f2
# 列表 存储多个数据 b=[1,2,3,4]
# 列表名 = 赋值 []列表的标志
# 数据 变量 a=1 a变量名 =赋值 1数据
# 增删改查
# b=[1,2,3,4]
# b.clear()
# print(b)
#循环 for while
# for i in range(6):#生成一个0-5的序列[0,1,2,3,4,5]
# print(i)
# i=0
# while i<4:
# print(b[i])
# i=i+1
# 0 1 2 3 索引
# b[2]
# a() 函数 参数
# forward(100) 函数的调用
# a=[2,3,4,5,6]
# i=0
# while i<5:
import
turtle
b
=
turtle
.
Pen
()
def
a
(
n
,
k
):
#形式参数 形参 1个形参
for
i
in
range
(
k
):
b
.
fd
(
n
)
b
.
left
(
360
/
k
)
a
(
100
,
'6'
)
#实际参数 实参
turtle
.
done
()
#个数一致,顺序一致,类型一致
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