摘要: 1 #函数 2 #参数 3 #1.必须参数 2.关键字参数 3.默认参数 4.形式参数(形参) 4 # round(操作变量,保留小数点几位,且四舍五入) 5 a = 1.12386 6 print(round(a,3)) # 1.124 7 8 9 def functionname(str): 1 阅读全文
posted @ 2020-06-17 18:11 霜井 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 1 # 分支、循环、条件与枚举 2 # 表达式(Expression)是运算符(operator)和操作数(operand)所构成的序列 3 a = 1 4 b = 2 5 c = 3 6 print(a + b * c, 1 or 2, 1 and 3, a or (b and c), (a or 阅读全文
posted @ 2020-06-17 15:41 霜井 阅读(242) 评论(0) 推荐(0) 编辑