# while 循环
a = 1
while a < 10: # 当 a >= 10 时,条件不成立
print(a)
a += 2 # 等价 a = a + 2
a1 = 1
sum1 = 0
while a1 < 9977:
a1 += 1
sum1 += a1
print("while一种执行了 %d 次" %a1)
print("结果是{}".format(sum1))
# while 循环
a = 1
while a < 10: # 当 a >= 10 时,条件不成立
print(a)
a += 2 # 等价 a = a + 2
a1 = 1
sum1 = 0
while a1 < 9977:
a1 += 1
sum1 += a1
print("while一种执行了 %d 次" %a1)
print("结果是{}".format(sum1))