Commit fe1ed6f2 by BellCodeEditor

auto save

parent dc22b1a3
Showing with 35 additions and 0 deletions
# 列表 存储多个数据 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()
#个数一致,顺序一致,类型一致
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