python --while 练习2

#python --while 练习2

#输出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:08  VV2018  阅读(93)  评论(0编辑  收藏  举报