Created
April 13, 2020 12:10
-
-
Save Celia-code/73b85c62eb3223516cb6708cffb0374e to your computer and use it in GitHub Desktop.
嵌套
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 判斷1-100間的奇數及偶數 | |
for i in range(1, 101): | |
if i % 2 == 0: | |
print("%d是偶數" % i) | |
else: | |
print("%d是奇數" % i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment