Skip to content

Instantly share code, notes, and snippets.

@Celia-code
Created April 13, 2020 12:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Celia-code/73b85c62eb3223516cb6708cffb0374e to your computer and use it in GitHub Desktop.
Save Celia-code/73b85c62eb3223516cb6708cffb0374e to your computer and use it in GitHub Desktop.
嵌套
# 判斷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