Life is but a dream.

大栗出奇迹

自律

使用Python输出1-100内所有的奇数

 1 #! /usr/bin/env python3
 2 # -*- coding:utf-8 -*-
 3 
 4 # 输出1-100内所有的奇数
 5 
 6 count = 1
 7 
 8 while count < 101:
 9     tmp = count % 2
10     if tmp == 0:
11         pass
12     else:
13         print(count)
14     count += 1

 

posted @ 2021-09-16 17:42  大栗出奇迹  阅读(2864)  评论(0编辑  收藏  举报