Skip to content

Instantly share code, notes, and snippets.

@Celia-code
Last active April 6, 2020 09:57
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/c2aae78ef0be4ceaff0a857fe9372e6a to your computer and use it in GitHub Desktop.
Save Celia-code/c2aae78ef0be4ceaff0a857fe9372e6a to your computer and use it in GitHub Desktop.
while循環
n = 0
total = 0
while (n < 10):
n += 1 # 等同 n = n + 1   
total += n
print(total)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment