摘要: 循环语句 while语句 while 条件: 条件成立所执行的代码 ... 示例1 print('开始') while True: print('hello,world!') print('结束') #输出 hello,world! hello,world! hello,world! ... 示例2 阅读全文
posted @ 2021-03-05 16:54 tonitaka 阅读(90) 评论(0) 推荐(0)
摘要: 条件语句 if 条件: 条件成立后的代码... ... else: 条件不成立后的代码... ... 基本条件语句 #示例1 print('开始') if 5 == 5: print('123') else: print('456') print('结束') #示例2 num = 19 if num 阅读全文
posted @ 2021-03-05 09:44 tonitaka 阅读(91) 评论(0) 推荐(0)