多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
表达式:运算符和操作数构成的序列 #### 条件判断if ~~~ age = 3 if age >= 18: print('your age is', age) print('adult') elif age <=10: print('your age is', age) print('teenager') else: print('your age is', age) print('teenager') ~~~ ### 循环for,用于遍历 ~~~ sum = 0 for x in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]: sum = sum + x else: print('end') for x in range(0,10,1): print(x) ~~~ ### 循环while,用于递归 ~~~ sum = 0 while sum > 0: sum = sum + 1 else: print('end') ~~~