while循环与使用场景

# 循环
# 循环语句
# while for

"""
while condition:
    # 代码块
"""   

a = 1
while a < 100:
    print(a)
    a += 1
counter = 1

while counter < 10:
    print(counter)
    counter += 1
else:
    print("终于王者10星了")
1
2
3
4
5
6
7
8
9
终于王者10星了

results matching ""

    No results matching ""