python --while 练习3

#python --while 练习3

#输出1 - 100 内的偶数:

 

#!/usr/bin/env python
#-*- coding:utf8 -*-

num = 1

while num <= 100:
  if num % 2 == 0:
    print(num)
  num += 1

posted @ 2018-04-27 16:10  VV2018  阅读(92)  评论(0编辑  收藏  举报