Skip to content

Instantly share code, notes, and snippets.

@Celia-code
Created April 13, 2020 12:10
Embed
What would you like to do?
嵌套
# 判斷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