1. 循环
count = 1 while count <= 5: print("大家好!") count = count + 1 # 输出: 大家好! 大家好! 大家好! 大家好! 大家好!
结果:while 可以进行循环, count 表示计数, 而while count <=5:限制循环的范围, count = count + 1 第一次循环后加1进行第二次循环, 不超过循环的范围.
Copyright © 2024 S-skill Powered by .NET 8.0 on Kubernetes