n = 1 while n<=10: if n%2 ==0: print(n) n += 1
n = 2 while n <= 10: print(n) n += 2
n = 0 while n <= 100: n += 1 # 如果是奇数,使用continue跳过当前循环,进入下次循环 if n % 2 == 1: continue print(n)
for i in range(0, 100, 2): print(i)