Skip to content

Instantly share code, notes, and snippets.

@slingam00
Last active May 21, 2020 09:09
Show Gist options
  • Save slingam00/4ff64e2acb255ade171271c5f7927d80 to your computer and use it in GitHub Desktop.
Save slingam00/4ff64e2acb255ade171271c5f7927d80 to your computer and use it in GitHub Desktop.
incrementer = 1
while incrementer < 6:
print(incrementer)
incrementer = incrementer + 1 # re-assigning incrementer to one value higher
# while loop breaks when incrementer equals 6
# the while loop runs 5 times and
# 1, 2, 3, 4, and 5 are printed on 5 lines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment