zhyann的头像-白鸢的笔记
管理员
这家伙很懒,什么都没有写...
Python自定义函数2-白鸢的笔记

Python自定义函数2

1.函数多返回值1.1用多个变量接收按照返回值的顺序,写对应顺序的多个变量接收即可变量之间用逗号隔开支持不同类型的数据returndef test_return(): return 1, 2 x,y =test_return() print(x) pr...
2年前
0315
Python自定义函数1-白鸢的笔记

Python自定义函数1

1.函数的定义语法def 函数名(传入参数): 函数体 return 返回值函数使用步骤:       ·先定义函数       ·后调用函数注意事项:       ·参数不需要,可以省略       ·返回值不...
2年前
0668
Python循环语句 while循环-白鸢的笔记

Python循环语句 while循环

1.while语句的基本语法i = 0 while i < 10: print(i) i += 1 2.while循环嵌套实例:while循环打印9*9乘法表1*1 = 11*2 = 2 2*2 = 41*3 = 3 2*3 = 6 3*3 = 91*4 = 4 2*4 = 8 3*4 = 12 4*4 = 1...
2年前
04311
Python循环语句 for循环-白鸢的笔记

Python循环语句 for循环

1.for循环格式for循环的语法格式是:for 临时变量 in 待处理数据集(序列类型):        (临时变量是可以在for循环里正常调用的)     循环满足条件时执行的代码   注意缩进序列类型指其内...
2年前
0398
判断语句的嵌套-白鸢的笔记

判断语句的嵌套

需求:1.必须是大于等于18岁小于30岁的成年人2.同时入职时间需满足大于两年,或者级别大于3才可领取age = int(input('请输入你的年龄:')) year = int(input('请输入你的入职年限:')) level = int...
2年前
0557
if elif else语句的使用-白鸢的笔记

if elif else语句的使用

1.if语句基本格式age = int(input('请输入你的年龄:')) if age >= 18: print('我已经成年')2.if else判断age = int(input('请输入你的年龄:')) if age >= 18: print('我已经成年') else: ...
2年前
03511
判断语句的嵌套-白鸢的笔记

判断语句的嵌套

需求:1.必须是大于等于18岁小于30岁的成年人2.同时入职时间需满足大于两年,或者级别大于3才可领取age = int(input('请输入你的年龄:')) year = int(input('请输入你的入职年限:')) level = int...
2年前
04614
if elif else语句的使用-白鸢的笔记

if elif else语句的使用

1.if语句基本格式age = int(input('请输入你的年龄:')) if age >= 18: print('我已经成年')2.if else判断age = int(input('请输入你的年龄:')) if age >= 18: print('我已经成年') else: ...
2年前
04313
判断语句的嵌套-白鸢的笔记

判断语句的嵌套

需求:1.必须是大于等于18岁小于30岁的成年人2.同时入职时间需满足大于两年,或者级别大于3才可领取age = int(input('请输入你的年龄:')) year = int(input('请输入你的入职年限:')) level = int...
2年前
012211
if elif else语句的使用-白鸢的笔记

if elif else语句的使用

1.if语句基本格式age = int(input('请输入你的年龄:')) if age >= 18: print('我已经成年') 2.if else判断age = int(input('请输入你的年龄:')) if age >= 18: print('我已经成年') else...
2年前
04214