📜  在 python 代码示例中打印偶数

📅  最后修改于: 2022-03-11 14:45:14.958000             🧑  作者: Mango

代码示例1
# Print even numbers python

lower_limit = 0
max_limit = 100
for i in range(lower_limit, max_limit):
  if i%2 == 0:    # even numbers are divisible by 2. i%2 will give the remainder when i is divided by 2. if i is even, the remainder will always be 2.
    print(i)

#